5450 Posts in 1672 Topics by 1197 members
Page: 1 2
|Go to End||Next >|
18 February 2012 at 6:30am
I have been working with SilverStripe for last 3 months, did many interesting and challenging things.
Today i had to fix some issues with translation and some missing files.
After trying to enable 2nd language for content my default was changed.
Polish language was changed to English and i can't rollback.
SS version: 2.4.6
was interface was running in Polish (in my admin profile it is still polish) changed to English.
Polish translation is present no files seem to be missing.
On fresh install of SS: Polish language doesn't work from start (CMS uses en_GB/US).
P.S. this might sound strange, ask as many questions as you wish, so i can explain in more detailed form.
18 February 2012 at 9:11am
Hi ShachMaT, welcome to the forums,
You need to set the default locale before you enable Translatable:
When Translatable is enabled, it will create a 'Locale' field in every page and other Translatable object. If you don't set the default locale like this, then 'en_US' is used. Once done, you can't easily go back!
This has nothing to do with the CMS user profile locale or i18n::set_locale('...')
20 February 2012 at 4:41am Last edited: 20 February 2012 8:36am
i figured out the way to get Polish and English content on front of the page.
But still i can't get CMS (Back-end) to work with polish and i don't mean the editing i mean the labes for tabs, buttons, controls etc.
21 February 2012 at 12:15am
When I set my admin profile to Polish (after installing in Dutch ), I get this (see attachment) in SilverStripe 2.4.7, so normally that should work for you as well... But you don't see any Polish, ever, not even after reloading the CMS? What version of the CMS are you using?
21 February 2012 at 8:24am Last edited: 21 February 2012 8:25am
Yes even if i refresh CMS, clear cache etc.
I'm running SS v 2.4.6
and i can't get the result like you shown in that screenshot, what's more it doesn't even read from en_US language file. It uses DEFAULTS from templates (ones used with _t() ).
Thank you for your patience
25 February 2012 at 1:57am
I don't have any problems using Polish on backend. Maybe try this:
// Set the site locale
25 February 2012 at 3:56am
I would think that the backend profile settings would normally overrule the i18n::setLocale() in _config.php. There must be a reason why, as you said, i18n doesn't seem to work at all.
If _t() always returns the default, the only thing I can think of is that for some reason the pl_PL.php language file is not present in /cms/lang/ or it cannot be loaded. But I don't know why that should be...
26 February 2012 at 3:29am
I have migrated my local copy (one with not working PL) to web server (with working PL).
CMS Language stopped working after migration. This got to be problem with my config.
SS_Log::add_writer(new SS_LogFileWriter('*logfile*'), SS_Log::WARN, '<=');
$project = 'project';
// on webserver this line is commented
// Object::add_extension('SiteTree', 'Translatable');
$allowed_locales = array(
'pl_PL' => array('Polish', 'Polski'),
'en_US' => array('English', 'English')
i18n::$common_locales = $allowed_locales;
Page: 1 2
|Go to Top||Next >|