Admin functionality to switch language to english for existing users.

Georg Osiejuk
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 20, 2021

 

#jira
We would like to switch dozens of existing users to another language (from german to english). Is there an admin functionality for this?




 

1 answer

1 accepted

1 vote
Answer accepted
Radek Dostál
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 20, 2021

I don't believe there is an option for this, but it probably could be done either via java/groovy (if you have ScriptRunner or another plugin allowing execution of groovy scripts). The user's locale should can be found in preferences:

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.user.ApplicationUser
import com.atlassian.jira.user.preferences.ExtendedPreferences
import com.atlassian.jira.user.preferences.UserPreferencesManager
import com.atlassian.jira.user.util.UserManager

UserManager userManager = ComponentAccessor.getUserManager()
ApplicationUser applicationUser = userManager.getUserByName("myusername")

UserPreferencesManager userPreferencesManager = ComponentAccessor.getComponent(UserPreferencesManager)
ExtendedPreferences extendedPreferences = userPreferencesManager.getExtendedPreferences(applicationUser)

extendedPreferences.getText("jira.user.locale")

// => en_UK for me

 

Alternatively from the DB such as found here: https://community.atlassian.com/t5/Jira-questions/How-to-find-User-s-Language-in-Jira/qaq-p/1101468

select u.user_key, PROPERTY_KEY, propertyvalue 
from propertyentry pe
join app_user u on u.id = pe.entity_ID
join propertystring ps on ps.id = pe.id and property_Key = 'jira.user.locale';

Might need to tweak the query a little to get your users, etc., but it's a start at least.

 

As usual, tinkering with any of these is not supported and you can brick your instance if you update the values wrongly or mistakenly update something in a bad way. I never recommend to do anything with the database, if you are not fully aware of the impact. A full testing on a separate staging instance is always a must.

If you're not confident and comfortable doing full testing if everything does work afterward (I don't know if you can just switch it and restart Jira or if something else could be missing), the best way would be to just let the users switch the language on their own, nothing can really go wrong with that and you're not risking breaking anything.

We've never really done such a bulk update for the users, I imagine it's not a very common use case, but perhaps someone can give you a better idea. These are just my first thoughts how I'd tackle it, but I'd really push towards getting the users switch their preferences themselves rather than tinkering with the backend.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
8.13.8
TAGS
AUG Leaders

Atlassian Community Events