More in this section
Forums / Sitefinity SDK / How to create a module in a website with 3 front-end languages?

How to create a module in a website with 3 front-end languages?

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
2 posts, 1 answered
  1. Bruno Michels
    Bruno Michels avatar
    125 posts
    16 Apr 2010
    16 Feb 2011
    Link to this post
    My resources are defined as the following:

        <clear />
        <add culture="en-US" uiCulture="en" key="english-en-us" />
        <add culture="pt-BR" uiCulture="pt" key="portuguese-pt-br" />
        <add culture="es-ES" uiCulture="es" key="spanish-es-es" />
        <clear />
        <add culture="en-US" uiCulture="en" key="english-en-us" />

    I've create a ApplicationModule using SitefinityModule template that comes with the installation. It does appear on /Sitefinity/Administration/Settings/Advanced > System > ApplicationModules.

    I've configured it to install "OnApplicationStart", but I always get that error in this line:

    sf.DocumentLibrary().CreateNew().Do(lib =>
        lib.Title = ModuleName;     // ERROR
        lib.UrlName = ModuleName;

    lib language is setted as "pt-BR", but my backend is not in portuguese, it is only in english.

    Unsupported language "pt-BR". If you want to support this language, please configure your application accordingly.

    My SO is Windows 7 pt-BR.

    How exactly does it work? What should I do to build a module that can work in any language?

    Forcing to en-US

    System.Threading.Thread.CurrentThread.CurrentCulture =
                        System.Threading.Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US");

    Showed the same error, but for en-US.

    Checking for


    Shows that it is empty.

    How do I configure these languages?


    This only happens when I have more than one front-end language.
  2. Pavel Iliev
    Pavel Iliev avatar
    140 posts
    18 Jul 2016
    22 Feb 2011
    Link to this post
    Hello Bruno Michels,

    This has been logged as a bug. It is related to a problem that in multilingual mode Sitefinity doesn't set correctly the current UI culture during the installation of Modules. 
    As a workaround i propose to change the beginning of your module install method like this:

    public override void Install(SiteInitializer initializer){
        if (Config.Get<ResourcesConfig>().Multilingual)
            System.Threading.Thread.CurrentThread.CurrentUICulture        =     CultureInfo.GetCultureInfo    (Config.Get<ResourcesConfig>().DefaultBackendCulture.UICulture);

    Anyway this bug will be fixed for SP1 that will be releasing this week.

    All the best,
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
2 posts, 1 answered