More in this section

Forums / Developing with Sitefinity / Localizable Modules

Localizable Modules

3 posts, 0 answered
  1. zac
    zac avatar
    3 posts
    Registered:
    13 Feb 2008
    04 Mar 2008
    Link to this post
    Hi Sitefinity Team,

    I've been working on developing a (pluggable) module for a site that is intended to be multilingual. This means I need to make the module support localization - both in the admin interface and on the front-end. At this stage I've been unable to achieve this.

    I have tried two different approaches in developing this module. Firstly, creating a fully customized module (using our own DB schema, an alternative ORM to Nolics - my company's preferred - and, overriding the CreateChildControls event of the ControlPanel etc) but could see no way to localize this. My second approach has been to use the Generic Content as in the Events example posted late last year. This way, at least, I can see the "(For all languages)" label on the edit form which indicates to me that I might be heading in the right direction here (although this approach is presenting me with other issues but I'll get to them in a seperate post if necessary).

    I have been unable to find any examples online as to how I should go about supporting localization. So my questions are: Is there a document or sample project that illustrates this and, if so, where can I find this? If not, is there some other way I can learn how to achieve this?

    My preference is to be able to use the custom approach we initially used.

    Thanks in advance,
    Zac
  2. Bob
    Bob avatar
    330 posts
    Registered:
    30 Dec 2016
    06 Mar 2008
    Link to this post
    Hello zac,

    Unfortunately we do not have any examples for localization support yet. Localization usually involves very complex backend and API designs dependant on your particular needs. We provide simple API for localization through LocalizationManger but I do not suggest using it. It is inefficient and it does not support searching and sorting. However, it provides an easy way to support localization in your modules and it will work fine for relatively small amounts of data.

    To implement localization yourself you need to determine the current language like this:
    stirng language = CultureInfo.CurrentUICulture.Name;
    Then retrieve and display data filtered by that language.

    To allow users to select language you place LanguageBar control on your pages. The control will automatically set the current culture.

    I hope this information helps. If you need further assistance don’t hesitate to ask.

    Kind regards,
    Bob
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Netfinity
    Netfinity avatar
    11 posts
    Registered:
    15 Nov 2006
    06 Mar 2008
    Link to this post
    Thanks Bob - that's what I needed to know.

    Cheers,
    Zac
Register for webinar
3 posts, 0 answered