Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » serious problems 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: 1442 Views
  • rino
    Avatar
    Community Member
    12 Posts

    serious problems with i18n Link to this post

    i use the 2.2.1 version of silverstripe.

    has someone ever really implemented a proper i18n-page with silverstripe? i have serious problems with it:

    where do you implement the mapping logic for mapping the language (en, de, fr etc.) to the locale (en_US, en_UK, de_DE, de_CH, fr_FR etc.)?

    i guess one has to map de->de_DE or fr->fr_FR for example if you want to have german and french content and user interface...

    i tried to implement the mapping in the init() method of Page_Controller in Page.php, but then some parts of the website don't get the right locale (for example when i try to recover my password and i type in a wrong email address, i get only en_US error messages...).

    the i18n documentation is kind of poor so it only tells how to set the locale and read the locale, but doesnt say anything about how EXACTLY and WHERE EXACTLY to implement the i18n logic of switching languages...

    can someone help?

  • Ingo
    Avatar
    Forum Moderator
    801 Posts

    Re: serious problems with i18n Link to this post

    > where do you implement the mapping logic for mapping the language (en, de, fr etc.) to the locale (en_US, en_UK, de_DE, de_CH, fr_FR etc.)?
    you've uncovered an architectural oversight in the implementation - we were assuming short locales for frontend context, long locales for CMS contexts, but templates always use lookup tables with long locales, and can be used in both contexts. hence the mapping, which should happen automatically in the future (e.g. when requesting "de", you'd get "de_DE" by default).

    integration of i18n was only possible because we got 3 solid months of development time sponsored by Google - its a good start, but lots to improve. there has been recent offers for help in i18n, see http://groups.google.com/group/silverstripe-dev/browse_frm/thread/7a4c8bb74f01aecc. the thread also contains a list of outstanding tickets (feel free to raise the missing mapping there). we need help from the community to polish i18n - and can provide guidance if you want to contribute!

  • rino
    Avatar
    Community Member
    12 Posts

    Re: serious problems with i18n Link to this post

    thanx ingo for your answer.

    i'm new to silverstripe and i really want to understand the ideas behind the framework and implementations. the company i work for in switzerland (www.rosa.com) is also interested in contributing code improvements and new features.

    i will also try to add a ticket about the language<->locale mapping, would be nice if one could do it in a configurative way in the future.

    keep up your good work!

    1442 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.