+1-888-365-2779
Try Now
More in this section

Forums / Set-up & Installation / Localization: Adding extra language to supported cultures

Localization: Adding extra language to supported cultures

13 posts, 0 answered
  1. JAllen
    JAllen avatar
    34 posts
    Registered:
    23 Dec 2010
    15 Mar 2011
    Link to this post
    We're based in Wales (UK) and are trying to add the Welsh language for a site, which we've done, but are having some issues with the backend.  FYI we're using SF3.7 sp4.

    In the backend, when Welsh ("Cymraeg") is selected in the top-right language dropdown, accessing any of the Generic Content based modules gives us the attached error (error.jpg).  The line that stood out to me is:

    "Culture ID 4096 (0x1000) is not a supported culture."

    However, everything seems to work fine if you start in English, go to the module, edit an item and then choose the language from the right sidebar (which automatically changes the top-right language dropdown).

    Can you advise how to make it so Welsh is a supported language?

    Thanks,
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    15 Mar 2011
    Link to this post
    Hi JAllen,

    Can you show paste the <localization> node of the web.config with the changes you made? Have you set globalization element of the web.config to some culture, because this might be a problem as well.

    All the best,
    Ivan Dimitrov
    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!
  3. JAllen
    JAllen avatar
    34 posts
    Registered:
    23 Dec 2010
    15 Mar 2011
    Link to this post
    Hi Ivan,
    Sure - here it is:

    <localization defaultProvider="Sitefinity"  persistenceMode="PathPrefix" defaultCulture="en" allowSpecificCultures="false" cultures="en, wl, fr, es">
        <providers>
            <clear/>
            <add name="Sitefinity" type="Telerik.Localization.Data.DefaultProvider, Telerik.Localization.Data" connectionStringName="DefaultConnection"/>
        </providers>
    </localization>

    We created a custom culture on the server and then added the prefix (wl).

    You asked if I 'set globalization element' - I'm not sure what you mean by that, can you clarify?

    Thanks,
  4. JAllen
    JAllen avatar
    34 posts
    Registered:
    23 Dec 2010
    16 Mar 2011
    Link to this post
    Has anyone else successfully added unsupported languages to SF?
  5. JAllen
    JAllen avatar
    34 posts
    Registered:
    23 Dec 2010
    17 Mar 2011
    Link to this post
    Hi Ivan,
    Just to clarify and offer as much information as possible on this one, the issue is the "wl" culture (Welsh) - it's not one that's natively supported by .NET and therefore SF.  We've tried to add it ourself, which has kind of worked - we can create Welsh versions of generic content items, but it's not seamlessly integrated into the backend as with other language that *are* natively supported by .NET (eg French, Spanish, etc).

    The question is, how can we add a non-supported language?  Is there any documentation on this that would help?

    Thanks in advance, we're really stuck here.
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    17 Mar 2011
    Link to this post
    Hi JAllen,

    In ASP.NET there is an option to register custom cultures

    http://msdn.microsoft.com/en-us/library/system.globalization.cultureandregioninfobuilder.register.aspx

    Theoretically this will allow you to use a custom culture. The backend translation is based on embedded resources

    http://www.sitefinity.com/support/forums/sitefinity-3-x/general-discussions/sitefinity-back-end-localization-resources.aspx

    Best wishes,
    Ivan Dimitrov
    the Telerik team
  7. JAllen
    JAllen avatar
    34 posts
    Registered:
    23 Dec 2010
    17 Mar 2011
    Link to this post
    Hi Ivan,
    The localization resources in the link you posted doesn't include Welsh, so the question is how do we get Welsh in that list?

    I clicked on the link "Not Compiled Resources" for SP4 and they all appear to be compiled, whereas the link for SP3 appears to be what I would expect we need.  Is this a mistake for the SP4 link?

    If so, is it simply the case of taking each one of those .resx files, having it translated into Welsh, adding to our solution and recompiling?

    Thanks for your help on this.
  8. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    17 Mar 2011
    Link to this post
    Hi JAllen,

    I attached the not compiled resources which you should translate and return back to me for compilation. You have to put an extension before the .resx with the name of your custom culture which is declared in the web.config.

    Kind regards,
    Ivan Dimitrov
    the Telerik team
  9. JAllen
    JAllen avatar
    34 posts
    Registered:
    23 Dec 2010
    17 Mar 2011
    Link to this post
    Thanks Ivan, I think this is what we need!  Thanks for you help!
  10. JAllen
    JAllen avatar
    34 posts
    Registered:
    23 Dec 2010
    25 Mar 2011
    Link to this post
    Hi Ivan,
    Following on from the above, am I right in thinking the URL for news items follows the same pattern as pages?

    Ie, the article URL should always be the same for all versions with the exception of the language code after the domain - eg ~/en/news/article1.aspx and ~/fr/news/article1.aspx

    If this is the case, how do you set which language version is the default?  We've implemented this additional Welsh language, but for some reason all article names are in Welsh when the site default is English:

    <localization defaultProvider="Sitefinity"  persistenceMode="PathPrefix" defaultCulture="en" allowSpecificCultures="true" cultures="en, wl">
    and
    <add name="News" allowLocalization="True" urlRewriteFormat="[Publication_Date]/[Title].aspx" urlDateTimeFormat="yy-MM-dd" urlWhitespaceChar="_" visible="False" defaultMetaField="Title" securityProviderName="" allowVersioning="True" applicationName="/News" versioningProviderName="" commentsModeration="false" allowComments="true" connectionStringName="GenericContentConnection" type="Telerik.News.Data.DefaultNewsProvider, Telerik.News.Data"/>

    I tried adding defaultCulture="en" to the above News line, but it didn't help.

    Can you help?

    Thanks,
  11. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    30 Mar 2011
    Link to this post
    Hi JAllen,

    So, the important part is your default culture set in the localization node - defaultCulture. This is the invariant culture written with index 127 in the database for pages and content items.

    We get the CurrentUICulture from the thread and show the proper data. If you want to have localized titles/names you should set localizable ="True" for the News.Title metakey under <metaFields> section of the web.config.

    Kind regards,
    Ivan Dimitrov
    the Telerik team
  12. JAllen
    JAllen avatar
    34 posts
    Registered:
    23 Dec 2010
    31 Mar 2011
    Link to this post
    Hi Ivan,
    Thanks for your response but I don't think I explained my question very well.

    We do have our default cultre set to "en" and have also set localizable="True" for the metakey.  The problem is every time an admin saves a language version of an article, the URL changes to that version for all languages.

    So if you add a french version of an article, the URL for every version of that article changes.  Then if you create a Spanish verison, it changes again.  And continues to change every time you edit any language version.

    This is really bad for SEO as the URL's are always changing and also means there's no consistency with the language like there is with pages

    IE, no matter what language you are viewing, a page URL is *always* in English - this is what we want for News, but to maintain the localizable titles.

    Any ideas?  Thanks,
  13. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    05 Apr 2011
    Link to this post
    Hello JAllen,

    I tried to replicate the issue you reported with no avail. I attached a short video. Let me know if I am missing something. I was testing with 3.7 SP4.

    Kind regards,
    Ivan Dimitrov
    the Telerik team

Register for webinar
13 posts, 0 answered