Jump to:

23490 Posts in 18996 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » setting frontend language

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1324 Views
  • hwi
    Community Member
    5 Posts

    setting frontend language Link to this post

    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
    added that in the mysite/_config.php
    and flushed site
    and dev/build

    But 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

    Your CMS looks great! - Thanks for sharing

  • Juanitou
    Community Member
    323 Posts

    Re: setting frontend language Link to this post

    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.

  • hwi
    Community Member
    5 Posts

    Re: setting frontend language Link to this post

    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

  • carlos
    Community Member
    41 Posts

    Re: setting frontend language Link to this post


    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

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.