Jump to:

1036 Posts in 810 Topics by 315 members

Forum Module

SilverStripe Forums » Forum Module » Translate Module Forum

Discuss the Forum Module.

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

Page: 1
Go to End
Author Topic: 1471 Views
  • lluis
    Avatar
    Community Member
    3 Posts

    Translate Module Forum Link to this post

    Hi!

    I have used the "ca_AD.php" file to translate Module Form to catalan language. But, when I visit the forum in my website, not all the words are translated to catalan (and I have translated them in "ca_AD.php" file). I don't understand which is the problem, because (for example) the text "2 Missatges in 1 Topics by 1 members", we find in forum header, appears in english. And in "ca_AD.php" file I have:

    $lang['ca_AD']['ForumHeader.ss']['IN'] = 'a';
    $lang['ca_AD']['ForumHeader.ss']['BY'] = 'per';
    $lang['ca_AD']['ForumHeader.ss']['MEMBERS'] = 'membres';
    $lang['ca_AD']['ForumHeader.ss']['POSTS'] = 'Missatges';
    $lang['ca_AD']['ForumHeader.ss']['TOPICS'] = 'Temes';

    I don't understand why "Missatges" appears in catalan, and "in 1 Topics by 1 members" appears in english. I don't know if I have to do something else.

    I hope someone can help me.

    Thank's!

  • baba-papa
    Avatar
    Community Member
    279 Posts

    Re: Translate Module Forum Link to this post

    Find the template or include and see, if the text is replaced by _t() functions. The second step would be to check if the funtion really works.

  • Martijn
    Avatar
    Community Member
    271 Posts

    Re: Translate Module Forum Link to this post

    This is a bug in SSviewer with the template include files....

    I try to change T_ rules in the template from :

    <% _t(SELECT','Select') %>

    to:

    <% _t('ForumHeader.ss.SELECT','Select') %>

    This does work, but involves a lot of replaces.

    There was a patch, but the SSviewer has changed so I realy don't have a clue how to apply the patch in 2.3.3:

    http://open.silverstripe.com/ticket/2584

    Does anyone knows a patch that works in 2.3.3 ???

  • Martijn
    Avatar
    Community Member
    271 Posts

    Re: Translate Module Forum Link to this post

    It feels a little bit hacky, but this is what I did to make te forum translatable:

    In your Forum Template files Find and replace all occurences of

    _t('

    with

    _t('Forums.

    In the language files use Regex find & replace to replace all templatename.ss namespaces to Forums:

    nl_NL.*?.ss']\[

    with

    nl_NL']['Forums'][

    Where nl_NL is your language.

    This made all template includefiles translatable for me with SS version 2.3.3 and Forum version 0.2.3

  • lluis
    Avatar
    Community Member
    3 Posts

    Re: Translate Module Forum Link to this post

    Thank you very much!

    It has worked well in some cases, but not all.

    Somewhere I had to manually translate without use the _t() function.

    1471 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.