Hi group, is there a way to set the ISPConfig-language automatically depending on a users OS-Settings? As I have german and english speaken customers I want to offer them ISPConfig in there prefered language. 2 thoughts: !. getting the language from OS-settings (may only work with Windows?) 2. 2 different Login-pages (different port or different login-php) Has anyone solved such a scenario? Is it possible to copy the/a login script / folder and modifying the settings? Thanx Kai
thank you Till for the fast reply, I tried to copy the login.php in /home/admispconfig/ispconfig/web to login_en.php changing for example "Hier können Sie sich einloggen:" to "On this site you can login:" the sentence does not appeare anymore on the login_en.php page. And if I logout the original login.php is loaded instead of the new login_en.php Have you additonal informations for me? Thanx again Kai
You can get the language from the browser but not the language of the system... browser and system may have different languages...
@sjau thank you - yes, that could do the job. Still the question open, how to set ISPConfig to multilanguage-Login/Logoff-Screen. Kai
You can try to get the language from the browser of the user and then change line 31 in the web/login.php file to load the language file for the browser language and not the language that is defined in the configuration $go_info["server"]["lang"]
Yes I see - but does this not only effect the pages after login? What about the login-screen itself (which is also opened by the logoff.php). If I try to edit the german messages - these are not any more displayed after refresh ... Kai
Forget this last post! As I am no programer, I did not get Tills hint on time I think, that is the solution. I did not know, that there is content in /login/lib/lang/xx.lng to replace the messages on the login-screen. Thank you again - will post the solution when I got it ;-) Kai --- original post --- Yes I see - but does this not only effect the pages after login? What about the login-screen itself (which is also opened by the logoff.php). If I try to edit the german messages - these are not any more displayed after refresh ... Kai
fist solution As promised before I send a first solution for the login.php-language. A college of me, edited the original login-script in a way, that the browser-language is used to select the language of the login-screen: This works fine for us - but we did not test it alot - so please use it on own risk. I think, we will include an additional language selection field later where the browser-language is the default, but where users can deside to change it to there prefered one. Hope it helps others Kai
Looks ok. I recommend to check that $langs[1] is really a string containing just 2 chars an that the file "login/lib/lang/".$go_info["server"]["lang"].".lng" exists. Otherwise you might get errors when you try to include a non existing file or you might get vulnerable for remote inclusion attacks in case the HTTP_ACCEPT_LANGUAGE header is faked.