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

Forums / Bugs & Issues / Problem with Multiple Languages/Localization

Problem with Multiple Languages/Localization

6 posts, 0 answered
  1. Ben Alexandra
    Ben Alexandra avatar
    215 posts
    Registered:
    15 Sep 2012
    12 Jan 2008
    Link to this post
    Hi,

    I have a client who is using your multi-lingual support and having a little trouble.  The website is http://www.iaswece.org and it used to be that the English version (which is the default) was right in the root and came up fine, and then the German version was in a sub-folder called /de/, so if you changed to German, it would take you to http://www.iaswece.org/de/index.aspx

    With one of the recent releases, it changed the homepage from http://www.iaswece.org/index.aspx to http://www.iaswece.org/en/index.aspx.  so now each language, including the default, is in a sub-folder.

    This works for the US, and I think it works in Germany, and the people end up in the right place for their native languages, but people in countries who don't have a language, like Sweden (where their main office is) can't get into the site unless they type the full address, including a language.  So if they go to http://www.iaswece.org/ I think it's looking for a /se/ subfolder, or something, and doesn't work.

    Is there something I can change so that they would go to the /en/ version?

    Thanks

    Ben
  2. Nikifor
    Nikifor avatar
    232 posts
    Registered:
    18 May 2013
    15 Jan 2008
    Link to this post
    Hello Ben,

    In our opinion, the issue is provoked by a miss-configuration in the project web.config file. Can you please verify whether you have used the Swedish extension too in the localization settings? Below you can find the modification in the ‘cultures’ section which have to be done:

      <localization defaultProvider="Sitefinity" persistenceMode="PathPrefix" defaultCulture="en" cultures="en, de, sv">

    If this is the issue, just modify the section by removing the ‘sv’:

    <localization defaultProvider="Sitefinity" persistenceMode="PathPrefix" defaultCulture="en" cultures="en, de">

    Another thing which may help is setting the SetClientLanguage attribute in the localization section to false.  When this is done, the browser will redirect the request to the default web site language, regardless of the default browser settings. In your case, this is English.

    Hope that the provided information is helpful. Please let me know whether this helps and if this is still an issue or not.

    Regards,
    Nikifor
    the Telerik team
  3. Ben Alexandra
    Ben Alexandra avatar
    215 posts
    Registered:
    15 Sep 2012
    15 Jan 2008
    Link to this post
    Hi,

    This is my Localization section from the web.config:

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

    When I try to make the first line:
            <localization defaultProvider="Sitefinity" persistenceMode="PathPrefix" defaultCulture="en" cultures="en, de" SetClientLanguage="false"

    I get the error:
    Parser Error Message: Unrecognized attribute 'SetClientLanguage'. Note that attribute names are case-sensitive.

    I then tried making set lower case and got:
    Parser Error Message: Unrecognized attribute 'setClientLanguage'. Note that attribute names are case-sensitive.

    I don't get any code completion, so I'm not sure what it's supposed to be.  Please provide an exact sample, if possible, of what those lines should be.

    Thanks

    Ben
  4. Ben Alexandra
    Ben Alexandra avatar
    215 posts
    Registered:
    15 Sep 2012
    15 Jan 2008
    Link to this post
    We also heard rumors of people in Russia having issues.  Not sure if those are resolved, but if you just go to www.iaswece.org from Bulgaria, does it come up, or do you need the /en/index.aspx?

    Thanks

    Ben
  5. Nikifor
    Nikifor avatar
    232 posts
    Registered:
    18 May 2013
    16 Jan 2008
    Link to this post
    Hello Ben Alexandra,

    When I browse to the URL you gave me, I am automatically rerouted to the following http://www.iaswece.org/en/index.aspx. I am able to see the contents but this is just because I am using English as the default  browser language.
    If I change it to Bulgarian or Russian, I am getting a Runtime Error.


    As for the attribute name, please excuse me for the typo. Actually, the exact attribute of the <localization> section is autoSetClientLanguage.
    After setting autoSetClientLanguage to false, you can test whether the site is correctly displayed by changing the default language of the browser. I am attaching a screen shot where you can see how you can change it in IE:

    1. Go toTools -> Internet Options;
    2. Click Languages at the bottom of the dialog window;
    3. Click Add in Language Preferences and select the language you want to set as default browser language.

    Please let me know whether this helps and if the issue still persists.

    Best wishes,
    Nikifor
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  6. Ben Alexandra
    Ben Alexandra avatar
    215 posts
    Registered:
    15 Sep 2012
    16 Jan 2008
    Link to this post
    Great, that fixed it, thanks.  Yeah, on one of the recent SPs or updates, it defaulted to changing to the default language automatically.  I would think that should be an opt in, not an opt out.  It used to work like this, then it started changing to always go to /en/ for me and I think we lost some of our Google pagerank, since as far as they were concerned, the page moved.  Now it's back to just /index.aspx

    Thanks

    Ben
Register for webinar
6 posts, 0 answered