I have multilingual forum so I enabled
allow user locale and
set locale from accept language header and it works great. I registered a test user and I noticed that the user web browser language gets saved into the new user profile (instead of
(default)) which is perfect.
The only problem I have is that I migrated 800 users from phpBB and they all have
(default) in the user profile. I know that large portion of them would like to use different language but I don’t want to change default English in the global configuration because I want English to be the default.
Could you please tell me would it be possible to enter Discourse (
./launcher enter app) and loop through list of user names / IDs (anything) and change language in specified user profiles?
I was thinking to create a simple bash script like this:
while IFS= read -r username; do rails r "u = User.... $username" done < list_of_usernames.txt
But I’m lacking Discourse knowledge to run a command to edit user preferences… Could you please me with this?