938 Posts in 271 Topics by 291 members
Forum Module
SilverStripe Forums » Forum Module » Translate Module Forum
Discuss the Forum Module.
Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 1302 Views |
-
Translate Module Forum

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!
-
Re: Translate Module Forum

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.
-
Re: Translate Module Forum

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 ???
-
Re: Translate Module Forum

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
-
Re: Translate Module Forum

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.
| 1302 Views | ||
|
Page:
1
|
Go to Top |



