I see there are several issue about change language and set default locale. most of them didn't get appropriate result.
Do not blame developers that you must learn Ruby on Rails and then change a simple thing!
Changing default language to other available language in project must not be that much difficult and confusing even for developers!
I think it's a disadvantage for project.
we don't want to develop project. we just want to use this project as soon as easy!
Is there any practical and easy guideline for that?
Hi @hmahdi-s
I'm not sure who is blaming developers and asking you to learn Ruby on Rails, but that is not any of us. A lot of requested features are "not that difficult". The problem is finding the time to sit down and implement it. For the past month or so, we haven't really been able to do much development work because of the current situation with the virus.
At the moment, there is no practical and easy guideline for changing your default language. If you would like to change your default language, I can guide you through the custom changes that are required.
I'll keep this open and tagged as a feature request until we implement an easier way to change the default language.
@farhatahmad
I saw #918 and i followed but i couldn't achieve.
1- I couldn't find https://github.com/bigbluebutton/greenlight/blob/master/app/controllers/application_controller.rb#L100 easy. Because it wasn't in ~/greenlight directory. finally i searched it by find command and then i found some files with same name and i changed all.
2- I changed I18n.locale = "en" to I18n.locale = "fa" and restart but nothing changed!
3- I changed config.i18n.default_locale = 'en-US' to config.i18n.default_locale = 'fa_IR' but not effected. link
I did change language for bigbluebutton successfully and easy . but for greenlight i have problem to find true directory and change value to set default language and rtl layout.
I hope your answer helps me.
thank you
Hi, @farhatahmad
i have installed the custom version of greenlight. i have also followed the steps as per steps mentioned in one of the dev groups.
i have set language to Arabic by changing
# Configure I18n localization.
config.i18n.available_locales = [:ar]
config.i18n.default_locale = :ar
also found the file
https://github.com/bigbluebutton/greenlight/blob/master/app/controllers/application_controller.rb#L100
but iam stuck here as i iam not sure what exactly needs to be change. tired to replace line 100 with "ar". iam not sure what iam doing is right.
can you please let me know where and how exactly it should be changed.
Thanks in Advance.
this did the trick for me. maybe it helps other people too
# Sets the appropriate locale.
def user_locale(user = current_user)
locale = if user && user.language != 'default'
user.language
else
"fa_IR"
end
begin
I18n.locale = locale.tr('-', '_') unless locale.nil?
rescue
# Default to Farsi if there are any issues in language
logger.error("Support: User locale is not supported (#{locale}")
I18n.locale = "fa_IR"
end
end
@mohammadalijf
where should we use this code? which file?
@mohammadalijf
where should we use this code? which file?
replace the user_locale method in application_controller with the given code.
https://github.com/bigbluebutton/greenlight/blob/master/app/controllers/application_controller.rb#L100
@mohammadalijf
where should we use this code? which file?replace the user_locale method in application_controller with the given code.
https://github.com/bigbluebutton/greenlight/blob/master/app/controllers/application_controller.rb#L100
Hi
Can you describe more please? How can I change installed greenlight language?
I've installed greenlight and bbb using bbb-install shell. Now I want to change the language of greenlight. How can I do that?
@mohammadalijf
where should we use this code? which file?replace the user_locale method in application_controller with the given code.
https://github.com/bigbluebutton/greenlight/blob/master/app/controllers/application_controller.rb#L100Hi
Can you describe more please? How can I change installed greenlight language?
I've installed greenlight and bbb using bbb-install shell. Now I want to change the language of greenlight. How can I do that?
bbb-install script will install non customizable version of greenlight. you need to pull and install greenlight directly from git source. detailed documentation is available Here
after manual setup you should change files accordingly from this issue and restart greenlight.
Most helpful comment
replace the user_locale method in application_controller with the given code.
https://github.com/bigbluebutton/greenlight/blob/master/app/controllers/application_controller.rb#L100