2014-01-16, 02:13:13
2014-01-16, 04:53:12
(2014-01-16, 02:13:13)lukoie Wrote: [ -> ]How do i set up default languge for the GS site(not user)?
setlocale(LC_ALL, 'en_EN'); in gsconfig.php didnt do the job.
Code:
setlocale()
2014-01-16, 04:58:35
There is no default lang or front end language, for front end multi language you must use a plugin like i18n.
2014-01-16, 04:58:40
*search search & found*
for what i read, i think you need a plugin to add multi languages support to your website.
there is the I18N plugin that looks very used and the de facto reference
http://get-simple.info/extend/plugin/i18n/69/
it comes with 10 languages ready to use and you can add as many as you need
Read more:
http://get-simple.info/forums/showthread...e+language
for what i read, i think you need a plugin to add multi languages support to your website.
there is the I18N plugin that looks very used and the de facto reference
http://get-simple.info/extend/plugin/i18n/69/
it comes with 10 languages ready to use and you can add as many as you need
Read more:
http://get-simple.info/forums/showthread...e+language
2014-01-16, 06:02:41
(2014-01-16, 04:58:35)shawn_a Wrote: [ -> ]There is no default lang or front end language, for front end multi language you must use a plugin like i18n.Thats weird, because as i can see, the strings are translated in lng file.
"LOGIN_FAILED" in my case.
2014-01-16, 06:07:23
(2014-01-16, 06:02:41)lukoie Wrote: [ -> ](2014-01-16, 04:58:35)shawn_a Wrote: [ -> ]There is no default lang or front end language, for front end multi language you must use a plugin like i18n.Thats weird, because as i can see, the strings are translated in lang file.
"LOGIN_FAILED" in my case.
yep, found a folder /admin/lang/ and inside found fr_FR.php but can't remember if it was here by default or if it's been added
2014-01-16, 07:20:35
so now when you try to log in using wrong password, you will get message in english, right?
2014-01-16, 08:24:23
(2014-01-16, 06:07:23)emanwebdev Wrote: [ -> ]yep, found a folder /admin/lang/ and inside found fr_FR.php but can't remember if it was here by default or if it's been addedYou added that file (or someone else did).. Default is only en_US
2014-01-16, 08:38:45
2014-01-16, 17:44:04
(2014-01-16, 07:20:35)lukoie Wrote: [ -> ]so now when you try to log in using wrong password, you will get message in english, right?
right. Actually, the login page is always in english, whatever config you set
For a customer, it's a no-way here in non-english speaking countries
UPDATE:
When looking at /admin/index.php (the login page/form),
there are
PHP Code:
<?php i18n('BACK_TO_WEBSITE'); ?>
and <?php i18n('USERNAME'); ?>
all over the place so it's i18n ready. I'll double-check my config. Sorry for the noise here
2014-01-16, 18:06:52
Gotcha!
Logon use the last used admin's language, if available through cookie:
admin/inc/common.php::114
otherwise, look in lang folder for a candidate:
admin/inc/common.php::157
If more than 1 language available, i.e. almost always true if you're running GS with a translation AND 'forgot' to delete the original english texts, the english is picked'up as 'fallback'!
The 'solution': Move the en_US.php file somewhere else... and make sure you have only your translation in this folder
Logon use the last used admin's language, if available through cookie:
admin/inc/common.php::114
PHP Code:
if (isset($_COOKIE['GS_ADMIN_USERNAME'])) {
(...)
$LANG = $datau->LANG;
otherwise, look in lang folder for a candidate:
admin/inc/common.php::157
PHP Code:
if(!isset($LANG) || $LANG == '') {
$filenames = getFiles(GSLANGPATH);
$cntlang = count($filenames);
if ($cntlang == 1) {
$LANG = basename($filenames[0], ".php");
} elseif($cntlang > 1) {
$LANG = 'en_US';
}
}
include_once(GSLANGPATH . $LANG . '.php');
If more than 1 language available, i.e. almost always true if you're running GS with a translation AND 'forgot' to delete the original english texts, the english is picked'up as 'fallback'!
The 'solution': Move the en_US.php file somewhere else... and make sure you have only your translation in this folder
2014-01-17, 04:43:10
ah, i'm using english, and my customers are using different language.
and i would like to have those messages for them to be in their language.
will try i18n then(but really would be lovely to have that in core).
cheers
and i would like to have those messages for them to be in their language.
will try i18n then(but really would be lovely to have that in core).
cheers
2014-01-17, 04:47:15
(2014-01-16, 18:06:52)emanwebdev Wrote: [ -> ]Logon use the last used admin's language, if available through cookie:I've tried that though, and no luck. Still english.
2014-01-17, 04:51:17
Just put one language file in the folder, it will be the default.
2014-01-17, 04:52:43
I added this to my gsconfig:
and now my login page is in Spanish (of course I have es_ES.php in admin/lang)
Code:
$LANG='es_ES';
2014-01-17, 04:56:32
(2014-01-17, 04:43:10)lukoie Wrote: [ -> ]ah, i'm using english, and my customers are using different language.
and i would like to have those messages for them
Add a dropdown select list in the login page then.
All the job's already done: scanning lang folder, aso
And look in install.php, lines 77 to 97. it's EXACTLY what you need
2014-01-17, 06:09:47
Since GS 3.0 you can use $LANG = 'xx_XX'; in gsconfig to set the default language (used in the login page)
http://get-simple.info/forums/showthread.php?tid=1877
http://get-simple.info/wiki/plugins:i18n#front-end
http://get-simple.info/forums/showthread.php?tid=1877
http://get-simple.info/wiki/plugins:i18n#front-end
2014-01-17, 06:13:57
That is also noted in the github issue, FYI
2014-04-04, 00:20:33
also note this issue
https://github.com/GetSimpleCMS/GetSimpleCMS/issues/799
https://github.com/GetSimpleCMS/GetSimpleCMS/issues/799
2014-04-05, 00:03:42
just done a fresh new install to discover/test the v.3.3.1 bundled with Patch_CKE_4.3.2 (had never tried it b4)
Can't find the $LANG = 'xx_XX'; in gsconfig.php anymore.
found a (new?) define('GSMERGELANG',true/false); flag, and define('GSEDITORLANG', 'fr');
but no $LANG = 'xx_XX'; anymore ???? missed something?
(2014-01-17, 06:09:47)Carlos Wrote: [ -> ]Since GS 3.0 you can use $LANG = 'xx_XX'; in gsconfig to set the default language (used in the login page)
Can't find the $LANG = 'xx_XX'; in gsconfig.php anymore.
found a (new?) define('GSMERGELANG',true/false); flag, and define('GSEDITORLANG', 'fr');
but no $LANG = 'xx_XX'; anymore ???? missed something?
2014-04-05, 03:48:52
Its a global injection hack, you have to add it.