Roundcube Community Forum

 

How set UI default language for all users

Started by mosiano, November 20, 2020, 03:02:37 AM

Previous topic - Next topic

mosiano

hello friends,
I want set User Interface default language for all users to my language, and my question is how can i do that in source code.
As you see in the Settings-->Preferences-->User Interface-->Main option --> Language menu bar there are many languages, and i want just use and see two language.
anybody can help me?! :)
Because I am new bee here in Roundcube and I am creating a new skin and need to provide two links in order to switch between languages.
tnx

Sheliancel

I'm new to Roundcube and I'm working on creating a new skin. I want to set the default language for all users to my language and have only two languages available in the Language menu bar. Can anyone help me with the source code changes needed to achieve this? I also need to add links in my skin for users to switch between the two languages.

JohnDoh

Setting the default language for your installation is done in the Roundcube config file:

// the default locale setting (leave empty for auto-detection)
// RFC1766 formatted language name like en_US, de_DE, de_CH, fr_FR, pt_BR
$config['language'] = null;


Limiting available language choice is not so simple. You could simply delete the unwanted languages from the localization folder but given you also want to add a special link to your skin to switch languages and you need to create a plugin to handle that you could also use the `preferences_list` hook which should let you edit the contents of the language list before it is displayed to the user.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...