21301 Posts in 5736 Topics by 2603 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1137 Views |
-
setting frontend language

1 February 2010 at 12:14pm
Hi
I guess it should be a simple task - but I jut not get it ...
How to set your frontend language to another than english - I can see the files are there.I red forth and back on the
// Enable Translations
i18n::enable();
i18n::set_locale('da_DK');
i18n::set_default_lang('da_DK');
added that in the mysite/_config.php
and flushed site
and dev/buildBut I do not get it - is the above really the way to go about making:
lets say the "search button" or the hover tooltip "go to ...... page"
change to your language?Please some one show me step by step what to do...
Thanks in advance
PS to the dev:
Why is the demo site of Silverstripe show a dropdown language list in admin - when a fresh install do not seem to have it?
Is there something wrong in my server environment?I red a few hours on translations , multi language and so on - I find the documentation to be very difficult to oversee and several comments beneath stating that there is code errors in the tutorials...
Setting the language of the frontend should be a straight forward thing to do - preferable from admin - with not a single touch to files, same goes for the way of assigning templates
Anyway:
Your CMS looks great! - Thanks for sharing -
Re: setting frontend language

1 February 2010 at 11:00pm
Hi hwi!
I’ve never used i18n without enabling Translatable, so my advice is maybe wrong, but I think i18n::set_default_lang() won’t work because it’s the same thing as Translatable::set_default_lang(). Normally you could remove it. Have you tried echoing i18n::get_locale() for testing if da_DK is being used?
As for the dropdown language list in admin, it’s Translatable which enables it.
-
Re: setting frontend language

2 February 2010 at 1:03am
Hi Juanitou
Thanks for the input - I will try to get the Translatable going. I might have misunderstood that this have to be done first.
Thanks for you reply
Cheers -
Re: setting frontend language

5 February 2010 at 3:45pm
Hi,
you are right, you can set language in mysite > _config.php i18n::set_locale('es_ES');
Now, the search form values are not translatable, so you will have to do it manually, SearchForm() in Page.php
| 1137 Views | ||
|
Page:
1
|
Go to Top |

