Does not change the default language via the settings file

Discussion in 'Installation/Configuration' started by SinglWolf, Jan 11, 2017.

  1. SinglWolf

    SinglWolf New Member

    In the version of ISPConfig 3 you can set the default language via the settings file
    /usr/local/ispconfig/server/lib/config.inc.php
    setting the value of the variable
    $conf['language'] = 'ru';
    In the version of ISPConfig 3.1 this method does not work.
    Changing the value of a variable
    $conf['language'] = 'ru';
    in the file /usr/local/ispconfig/interface/lib/config.inc.php is also not working.
    Please help to solve the problem.
     
  2. sjau

    sjau Local Meanie Moderator

  3. till

    till Super Moderator Staff Member ISPConfig Developer

    The $conf['language'] setting sets the language for the login page (language for not logged in users) and this works fine here in ISPConfig 3.1. It is not a settings to change the language of any users, the language of users is defined in their user settings and does not has to match the language if the login page. Beside that, it might be that langiage strings are missing in the language file that you are using, so that it looks as if the language as not been changed while the strings are simply not available in the language you use.
     
  4. SinglWolf

    SinglWolf New Member

    As always, you speak very abstruse things. I choose a language for which there are all the language files. Because the language change through the interface works.
    Why make the default settings a language via the variable
    $conf['language'] = 'ru';
    for the login page?
    It there is only two buttons that do not need translation.
    I need to set the default language for the page administrator and for all users.
    How to do it?
     
    alisik likes this.
  5. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    If you want to change settings for the interface, check interface/lib/config.inc.php instead of server/lib/config.inc.php
    There are not just 2 translations for the login-process. See interface/web/login/lib/lang
     
  6. SinglWolf

    SinglWolf New Member

    Changed from
    $conf['language'] = 'en';
    on
    $conf['language'] = 'ru';
    Not working
    About the translation of the login page understand, OK.
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Language strings are always lowercase. What Florian told you is that you shall edit the interface configuration file and not the one of the server. The login page is in the web interface and not on the server shell.

    Please reread my post. I said missing strings in a language file and not missing language file.

    The interface and the login page are different things, when you are on the login page, then no user is logged in so the system must know in which language the text and error messages need to be displayed and this setting is the language setting of the config.inc.php.

    Only 2 buttons, really? Here is all the text that is displayed on the login page:

    Code:
    <?php
    $wb['error_user_password_empty']    = "Username or Password empty.";
    $wb['error_user_password_incorrect']    = "Username or Password wrong.";
    $wb['error_user_blocked']               = "User is blocked.";
    $wb['error_user_too_many_logins']    = "To many wrong login's, Please retry it after 15 minutes";
    $wb['pass_reset_txt']       = 'A new password will be generated and send to your email address if the email address entered below matches the email address in your client settings.';
    $wb['pw_reset']             = 'The password has been reset and send to your email address.';
    $wb['pw_reset_act'] = 'You have been sent an activation link. Please visit the link to confirm your password request.';
    $wb['pw_error']             = 'Username or email address does not match.';
    $wb['pw_error_noinput']     = 'Please enter email address and username.';
    $wb['pw_reset_mail_msg']    = 'The password to your ISPConfig 3 control panel account has been reset. The new password is: ';
    $wb['pw_reset_mail_title']  = 'ISPConfig 3 Control panel password has been reset';
    $wb['pw_reset_act_mail_title']  = 'Confirm ISPConfig 3 Control panel password reset';
    $wb['pw_reset_act_mail_msg']    = 'Please confirm that your want to reset your ISPConfig 3 control panel account password by visiting the following activation link: ';
    $wb['user_regex_error'] = 'Username contains unallowed characters or is longer than 64 characters.';
    $wb['pw_error_length']  = 'The password length is < 1 or > 256 characters.';
    $wb['email_error'] = 'Email contains unallowed characters or has a invalid format.';
    $wb['login_txt']    = "Login";
    $wb['username_txt']    = "Username";
    $wb['password_txt']    = "Password";
    $wb['login_button_txt']    = "Login";
    $wb['pw_lost_txt']    = "Password lost";
    $wb['pw_reset_txt']    = "Password reset";
    $wb['pw_button_txt']    = "Resend password";
    $wb['email_txt']    = "Email";
    $wb['back_txt'] = 'Back';
    $wb['error_maintenance_mode'] = 'This ISPConfig installation is currently under maintenance. We should be back shortly. Thank you for your patience.';
    $wb['theme_not_compatible'] = 'The chosen theme is not compatible with the current ISPConfig version. Please check for a new version of the theme.<br />The default theme as been activated automatically.';
    $wb['stay_logged_in_txt'] = 'Keep me logged in';
    $wb['lost_password_function_disabled_txt'] = 'The lost password function is not available for this user.';
    $wb['lost_password_function_wait_txt'] = 'You cannot request a new password, yet. Please wait a few minutes.';
    $wb['lost_password_function_expired_txt'] = 'This activation link has expired. Please request a new one.';
    $wb['lost_password_function_denied_txt'] = 'This activation link is not valid.';
    ?>
    
    
     
    Last edited: Jan 11, 2017
  8. SinglWolf

    SinglWolf New Member

    Changed from /usr/local/ispconfig/interface/lib/config.inc.php
    $conf['language'] = 'en';
    on
    $conf['language'] = 'ru';
    NOT WORKING!!!!
     
  9. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    It is working but there are missing translations in interface/web/login/lib/lang/ru.lng
    You can change the values for login_txt and other values.
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    It is working perfectly and as it should work, but I see that you still have not understood what I explained you in post #3. I'll cite the text again:

    Did you look into the /usr/local/ispconfig/interface/web/login/lib/lang/ru.lng file? I guess not, otherwise you would have noticed that what I told you above is the case, the Russiann language file for the login form is incomplete, strings were missing and are replaced by english strings until a user who speaks russiin translates them and submits them for inclusion into ispconfig.
     
  11. SinglWolf

    SinglWolf New Member

    You Troll me? :(
    I need to change my default language not for the login page! I need to change the default language for the admin interface and user interface!
    Changing the language through the interface works, and through the variable $conf['language'] = 'ru'; in files /usr/local/ispconfig/interface/lib/config.inc.php does not work.
    Understand?
     
  12. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    you can set the language for each user using the interface. Or change the sql-defaults for client.language (default is en). This will not affect existing clients.
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    No.

    I answered your question in #3. Please see this:

    So the language setting of each user in ispconfig is individual you can have a admin user in english, a client user in russian, a reseller in german and so on. So there is no such thing as a global language, the language of each user is defined in the sys_user table of the ISPConfig interface and you can set it in the user settings of the user and as you confirmed above, setting the language of the user works for you.

    I'm understanding this but you don't understand it. so please read this thread again, I don't like to have to quote all my answers from above again.
     
  14. SinglWolf

    SinglWolf New Member

    I certainly understand that the language can be changed individually for each category.
    I don't understand why you can not change the default language globally.
    Why then need this variable???
    I need Russian language for the default, globally. How to do it?
     
  15. till

    till Super Moderator Staff Member ISPConfig Developer

    I'll give up on this, I will quote the answers once again from above and maybe someone else can explain it again in different words to you.

    From above:

    From Above:

     
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    As a side note, as we found out in this thread, the ru files are missing some translations. Neither I nor any of the other core developers speak Russian. So it would be nice if you or another ISPConfig user who speaks Russian could translate the missing strings and submit the language file set that can be exported with the ISPConfig language editor.
     
  17. SinglWolf

    SinglWolf New Member

    I understand that I will have to look for a solution myself. It's such a big secret. ;)
    Please make a list of files that need translated into Russian language. And where do I send the translated files?
     
  18. till

    till Super Moderator Staff Member ISPConfig Developer

    It is all explained above in detail, what this setting is doing and why it is there and what it affects and what it does not affect, so no secret here. Just try to get a cup of coffee or tea and then read the thread again. All the info you have asked is in here :) I'm sorry that we do not seem to understand us, so maybe someone else can explain again what I described above.

    Login to ISPConfig, go to System > Language editor, switch the language to "ru" and click trough the files and replace strings that are stil in russian or wrong. When you are finished, then use the export function of the language editor and make a request in the bugtracker for inclusion in ISPConfig and attach that file to our request. I will import it into git then so it get's part of the next release.
     
  19. till

    till Super Moderator Staff Member ISPConfig Developer

    I'll do a last attempt, maybe you understand me now.

    The iSPConfig interface can have two states, "no user is logged in", let's call this state (a) and "a user is logged in", let's call it (b).

    On which pages does (a) matter: the only page where a matters is the login page as all other pages are not accessible without a login. So how does ISPConfig know which language to use when there is no user logged in? The language for this pages is read from the $conf['language'] = 'en'; settings.

    Now to state (b), a user has passed the login page sucessfully, in that case his user details are read from the ispconfig database (table sys_user). As you know, you can change the language for a user in ISPConfig and this is the place where it is stored. Each user can have a different language, e.g. alexander has "ru", tom has "en" and Till has "de". As you can see, the language is individual for each user and it is stored in the database and set during login, so the global language settings does not matter in state (b).

    What else is the $conf['language'] = 'en'; used for: The setting is also used as default language for new clients. So when you add a new client in ISPconfig in the client module, then the language from $conf['language'] = 'en'; is selected as default for this new client.
     
  20. SinglWolf

    SinglWolf New Member

    How to make SQL query from the command line to change the language in the table sys_sys_user?
    ОК.
     

Share This Page