GetSimple Support Forum
Site default language - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: Developer Discussions (http://get-simple.info/forums/forumdisplay.php?fid=8)
+--- Thread: Site default language (/showthread.php?tid=1877)



Site default language - Carlos - 2011-06-24

Now that GS has MU capabilities, every user has his/her language for the backend, but how to define the default for the site? (used in the login screen).
In http://get-simple.info/wiki/plugins:i18n#front-end you can read it can be done by inserting in gsconfig.php a line like this:
Code:
$LANG = 'de_DE';

Questions:

- Is this intented only for use in the backend? Should plugin authors also consider that the default frontend language?

- Shouldn't default [temp.]gsconfig.php include something like this?
Code:
# default site language:
#$LANG = 'en_US';

- Wouldn't it be better (to be consistent with the rest of configurable options) to define it as a php constant?


Site default language - mvlcek - 2011-07-06

Carlos Wrote:Now that GS has MU capabilities, every user has his/her language for the backend, but how to define the default for the site? (used in the login screen).
In http://get-simple.info/wiki/plugins:i18n#front-end you can read it can be done by inserting in gsconfig.php a line like this:
Code:
$LANG = 'de_DE';

Questions:

- Is this intented only for use in the backend? Should plugin authors also consider that the default frontend language?

This is only to set a language for the frontend - for plugins to present the content in the correct language, when the I18N plugin is not used. In the backend, $LANG is overwritten with the language of the logged in user.

Carlos Wrote:- Shouldn't default [temp.]gsconfig.php include something like this?
Code:
# default site language:
#$LANG = 'en_US';

Yes, but without the #, so that the language is always available.

Carlos Wrote:- Wouldn't it be better (to be consistent with the rest of configurable options) to define it as a php constant?

Not in GS 3.0, as it is overwritten with the language of the backend user.
But in a new GS version it would make sense to have a constant and use it to initialize the variable $LANG.


Site default language - Carlos - 2011-07-15

mvlcek Wrote:
Carlos Wrote:- Wouldn't it be better (to be consistent with the rest of configurable options) to define it as a php constant?
Not in GS 3.0, as it is overwritten with the language of the backend user.
But in a new GS version it would make sense to have a constant and use it to initialize the variable $LANG

Yeah... This last question was more of a suggestion, for a future GS release.

Thanks for you answers.


Site default language - yojoe - 2012-03-11

Why $Lang variable didn't get into gs3.1 gsconfig file ?
Admin login form should also be available in native language.

It would be great to generate this var on the fly during installation basing on chosen language.