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.

Archive /

Our old forums are still available as a read-only archive.

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

Menu Translation with i18n


Reply


4 Posts   1439 Views

Avatar
cobi

Community Member, 5 Posts

8 January 2008 at 6:55am

I try the translation for my site with i18n and for the content it work good. But the field Navigation ($MenuTitle) doesn't save when I save my Navigation Label. It always stay in the primary site language.

I try to add "static $extensions = array("Translatable('MenuTitle')");" in my class page and now my template crash.

I'm currently in version 2.2.0 and I try to update to 2.2.1 and it make no change.

Can you help me?

Thank.

Avatar
cobi

Community Member, 5 Posts

22 January 2008 at 5:23am

Hi I do some test and I go on the SiteTree_Lang table and see than the MenuTitle is still Null for all records. I put a value in this field by sql request and now I have my translation shown. In the SiteTree class MenuTitle is in the $extension array for the translatable option.

Then why the MenuTitle field don't save when I save my page in the cms?

And what is the class I must look to understand and test the bug?

Thank.

Steve

Avatar
Ingo

Forum Moderator, 801 Posts

26 January 2008 at 6:22pm

the "MenuTitle" column is marked for being translatable by default, as you've noted.
i've doublechecked demo.silverstripe.com, the menutitles seem to translate fine there
(i've looked for the OriginalLangID of the original page in SiteTree_lang and SiteTree_lang_Live).

can you try this for a fresh installation in which you create a single page, publish it, and then create a new translation?

Avatar
cobi

Community Member, 5 Posts

2 February 2008 at 10:19am

I install a new fresh Silverstripe installation, enabled i18n and translate the default Home page to have a french one "Page d'accauil". And in navigation label I put "Acceuil" and it's was ok.

Then I change the default language to have "fr", because the default language site is in french and then again I can't no more translate the navigation label. It must be something with the i18n language part.

Thank.

Steve