Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Forum Module /

Discuss the Forum Module.

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

Translate Module Forum


Reply


5 Posts   1484 Views

Avatar
lluis

Community Member, 3 Posts

18 September 2009 at 4:17am

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!

Avatar
baba-papa

Community Member, 279 Posts

18 September 2009 at 11:19pm

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.

Avatar
Martijn

Community Member, 271 Posts

21 September 2009 at 4:29am

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 ???

Avatar
Martijn

Community Member, 271 Posts

21 September 2009 at 7:18am

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

Avatar
lluis

Community Member, 3 Posts

26 September 2009 at 4:15am

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.