3402 Posts in 979 Topics by 855 members
|Go to End|
19 August 2009 at 7:19am
The links in my main navigation have to be translated. They are static and lead to another site. I know how to work with i18n, but this is only described for modules, not for the templates of a theme.
I appreciate any help.
19 August 2009 at 8:16am Last edited: 19 August 2009 8:16am
If you have the latest SS version 3.2.2 all you have to do is go to the translations tab and create your translations from there. (You have to manually translate the links). This will allow you to make as many different translations for your site as you want.
Unless I'm mistaken and what you want is to change the language of your site? in Which case all you have to do is put this line
Replacing de_DE with your locale of choice of course.
in the mysite/_config.php file
19 August 2009 at 9:15am
Thanks for Your answer, Xeal. The translationfile de_DE.php contains the following line:
i18n::include_locale_file('modules: blog', 'en_US');
The Page.ss is not part of a module. Where do i put those translation files?
20 August 2009 at 2:01am
The way I make translations for Page.ss is bu going into the sapphire/lang/<language> files and adding whatever I need.
$lang['en_US']['Page.ss']['Link'] = 'Lien';
$lang['fr_FR']['Page.ss']['Link'] = 'Link';
and then in the Page.ss file you want to add a line that looks like this:
<% _t("Link","link") %>
That should do it for translations just add as many as you need.
20 August 2009 at 2:04am
Thanks for Your help Xeal. I will try this way.
20 August 2009 at 4:38pm
I tried it and it works, thanks again Xeal. I really have to say, that I love Silverstripe for itÂ´s features anf fexibility
11 September 2009 at 11:09pm
Let me suggest to add your translations not to sapphire/lang/<language> but to cms/lang/<language> or even better to mysite/lang/<language> - that way it does not get overwritten when you upgrade.
28 November 2009 at 12:21am
|Go to Top|