Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Menu Translation with i18n

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

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

Page: 1
Go to End
Author Topic: 1348 Views
  • cobi
    Avatar
    Community Member
    5 Posts

    Menu Translation with i18n Link to this post

    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.

  • cobi
    Avatar
    Community Member
    5 Posts

    Re: Menu Translation with i18n Link to this post

    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

  • Ingo
    Avatar
    Forum Moderator
    801 Posts

    Re: Menu Translation with i18n Link to this post

    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?

  • cobi
    Avatar
    Community Member
    5 Posts

    Re: Menu Translation with i18n Link to this post

    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

    1348 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.