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.

All other Modules /

Discuss all other Modules here.

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

[userforms] Translation of messages


Reply


6 Posts   1386 Views

Avatar
__fabrice

Community Member, 32 Posts

3 May 2009 at 10:23pm

Edited: 03/05/2009 10:23pm

Hi,

I search, for a moment, how to translate all the messages who appears, for example, when fields are not valid.
For now, the default language is english, but i want to change it.

I see there was a "lang" directory in the module. How can I use it ?

Thanx,

Fabrice

Avatar
baba-papa

Community Member, 279 Posts

3 May 2009 at 10:54pm

Hello fabrice,

in your config.php you have to activate the multilingial (i18n) support:

i18n::enable();


Then you have to set your system language:

i18n::set_locale('de_DE');

The multilingual support is right buggy in that module. So you have to customise some code. The validation messages e.g. "is a required field" are javascript. Find that file with an IDE codesearch and replace that text.

Good luck ;)

Avatar
__fabrice

Community Member, 32 Posts

3 May 2009 at 11:07pm

Edited: 04/05/2009 4:55am

Hi,

I have already done this :

i18n::enable();
//i18n::set_default_lang('fr');
i18n::set_locale('fr_FR');


But, the administration backoffice send me an error :
[User Error] Couldn't run query: SELECT Lang FROM SiteTree_lang GROUP BY Lang Table 'ss_bizup.sitetree_lang' doesn't exist

Ok, for the rest, i modify the js files as you say.

So, I try to change to use the js file /sapphire/javascript/lang/fr_FR.js, but with this :

i18n::enable();
i18n::set_default_lang('fr');
i18n::set_locale('fr_FR');


... nothing change :(

Thanx
Fabrice

Avatar
__fabrice

Community Member, 32 Posts

7 May 2009 at 6:49am

Hi,

No answers ? :(

Avatar
abdu1234

Community Member, 1 Post

31 May 2009 at 12:04am

Hi __fabrice,
i had that problem,
I run: sake /db/build/
and the admin section is restored but the site still displays the problem.

if i remove: i18n::set_default_lang('fr');

the site is displayed but no transplation

any ideas?

Avatar
__fabrice

Community Member, 32 Posts

31 May 2009 at 1:37am

Hi,

In my opinion, you must comment all the lines concerning the translation.

Fabrice