Jump to:

1835 Posts in 1139 Topics by 554 members

Blog Module

SilverStripe Forums » Blog Module » Template i18n

Discuss the Blog Module.

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

Page: 1
Go to End
Author Topic: 2310 Views
  • Henk Poley
    Avatar
    30 Posts

    Template i18n Link to this post

    Somehow the translation of the blog templates doesn't work. I do have the files in blog/lang/*.php, and they contain the right references to the templates. But everybody sees the blog controls in English. Our CMS is still translated, so it doesn't seem to be a global problem.

    Anybody knows what's going on?

  • Henk Poley
    Avatar
    30 Posts

    Re: Template i18n Link to this post

    Or is there some sort of override to always use nl_NL i18n? Basically all my traffic is Dutch anyways.

  • Henk Poley
    Avatar
    30 Posts

    Re: Template i18n Link to this post

    How I fixed it..

    Part 1:
    Old tutorials apparenly only wrote about enable(), set_default_lang() and using 'nl'. Full code for in mysite/_config.php

    // Enable Translations
    i18n::enable();
    i18n::set_locale('nl_NL');
    i18n::set_default_lang('nl_NL');

    Part 2:
    http://open.silverstripe.com/ticket/2102#comment:2
    This also needs a lot of extra language files and strings for your widgets.

  • Henk Poley
    Avatar
    30 Posts

    Re: Template i18n Link to this post

    Part 3:
    A patch that fixes included (<% include .. %>) templates source, so their i18n translation strings are sourced from the right namespace:
    http://open.silverstripe.com/ticket/3400

  • Kalileo
    Avatar
    Community Member
    127 Posts

    Re: Template i18n Link to this post

    Thanks Henk, I should have seen that before I patched all the templates concerned and added the "identifier>.ss." to the "_t(<i18n-name>, <string>)" calls.

    Testing and including your patch as fast as possible in the released version is a must for SS if they care about the International - non English speaking country - users. Most normal users will not be able to fix this, or workaround, and then it is a showstopper.

    2310 Views
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.