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

Forums / Deployment / Language of Navigators and deployment

Language of Navigators and deployment

6 posts, 0 answered
  1. Pierre
    Pierre avatar
    433 posts
    Registered:
    16 Feb 2006
    16 Mar 2009
    Link to this post
    Hi,

    I have some problems with redirects using standard "~/MyPage" and the language setting of users Navigators.
     
    I have one sol that implement "es" as default language and other languages "en, fr..". I have some pages external of cms like Client.aspx using one redirect for clients. The standard login redirect to Client.aspx page and pass one querystring.

    What are the problem ? :
    If the User navigator, like ie7 have one language settings like English-Us the redirects is not working, and similar for other languages if the navigator have one language selected.
     
    Sample : User demand initial page, Default. Page load. 
            http//www.website.com/home.aspx --OK
    User try to load in one UC login and set user/pass and  go. The navigator include as default the setting language as EN
            http//www.website.com/en/Client.aspx?user=My
    But this page with language "en" not exist. The redirect generate one error page not found.

    If you delete language the setting of ie7, no more problems.

    The redirects working only if Anonimous have one navigator with no settings language in ie7. Could you suggest some solution.

    Regards. 
  2. Dido
    Dido avatar
    149 posts
    Registered:
    24 Sep 2012
    19 Mar 2009
    Link to this post
    Hello Pierre,

    If I understood correctly, your problem is that Sitefinity does not generate url correctly when localization is enabled and the user has set localization settings in the browser.

    For starters, it is best to refresh your knowledge by reading section Working with modules -> Generic Content -> Localization (as this applies to all generic content-based modules - News, Libraries, Blogs, Events) of the User Manual.

    For example, if I enabled localization in web.config with
    <localization defaultProvider="Sitefinity" persistenceMode="PathPrefix" defaultCulture="en" cultures="en, es, fr, de, bg"
          <providers> 
            <clear/> 
            <add name="Sitefinity" type="Telerik.Localization.Data.DefaultProvider, Telerik.Localization.Data" connectionStringName="DefaultConnection"/> 
          </providers> 
    </localization> 

    and then enabled it for pages like:
    <cmsEngine defaultProvider="Generic_Content"
          <providers> 
            <clear/> 
            <add name="Generic_Content" urlRewriteFormat="[Publication_Date]/[Name].aspx" urlDateTimeFormat="yy-MM-dd" urlWhitespaceChar="_" visible="True" defaultMetaField="Name" securityProviderName="" allowLocalization="True" allowVersioning="True" allowWorkflow="False" allowComments="false" commentsModeration="true" versioningProviderName="" connectionStringName="GenericContentConnection" type="Telerik.Cms.Engine.Data.Providers.DefaultProvider, Telerik.Cms.Engine.Data"/> 

    it would work. I have attached a very simple web site that has a page translated to Bulgarian, and the language selector works no matter the browser settings.

    Greetings,
    Dido
    the Telerik team


    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. Pierre
    Pierre avatar
    433 posts
    Registered:
    16 Feb 2006
    19 Mar 2009
    Link to this post

    Hi,

    You are out of scope. IT's not a problem with localisation of contents. It's one problem with Redirecting and UserLanguages of Navigators settings.

    The Scope:
    One Default.aspx Page that redirect to one Home.aspx

    Home aspx page is external page because have one codebehind

    The pages are in Root
    The Sf defaultculture="es".No other localized pages.

    Case1:
    if Anonimous user have not setting in Navigator one language :
    UserLanguages is null. ( User have no setting in navigator ie)
    When my Default.aspx redirect to "~/Home.aspx", the page is Fired

    Case2:
    if Anonimous user have setting one or more languages in Navigator settings :
    UserLanguages[0].Substring(0,2) is "es"
    UserLanguages[1].Substring(0,2) is "fr"
    When my Default.aspx redirect to "~/Home.aspx" the setting of navigator modify my demanded page to "~/es/Home.aspx" and my page Not Fire.

    What are the needs : For any page internal or external, if no other culture has been definied in contents (only one Home page exist), any demand of page must go to defaultculture without using the culture because is defaultculture. In my culture case, Defaultculture is "es" and my page Home.aspx has been created in es, the page demandes is Not es/Home but Home. Something wrong?

    Regards

  4. Dido
    Dido avatar
    149 posts
    Registered:
    24 Sep 2012
    19 Mar 2009
    Link to this post
    Hello Pierre,

    Some things in the User Manual are easy to be forgotten, and that is why I pointed you to it. The idea is described in Multilingual Content Management -> Site Localization.

    If you set "persistenceMode" to "QueryString", your urls will not be generated with prefix (such as www.mysite.com/en/page.aspx), but with query string (such as www.mysite.com/page.asx?sflang=en). Then, there will be no problem with your external page, as Sitefinity will simply add a parameter (sflang) to the url and your custom page can ignore it altogether.

    However, you should know that localization can't be enabled on a per-page basis - it is enabled for Sitefinity as a whole (pages) and for the generic-content-based modules. All is done through the web.config.

    Kind regards,
    Dido
    the Telerik team


    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  5. Pierre
    Pierre avatar
    433 posts
    Registered:
    16 Feb 2006
    19 Mar 2009
    Link to this post

    Hi Dido,
    Thanks for lesson.

    My whole solution is fixed by persistenceMode="PathPrefix" DefaultCulture="Bg" Otherlanguages="Fr, Ge" 

    One Default.aspx page that redirect to BgHome.aspx using standard redirect(~/BgHome.apsx).

    Default page  and Home page are not localized in cms, are in "Bg" your tongue language. They are in the DefaultCulture="Bg". Now go to Default page and try yourselft the result, if your navigator have settings language as "Us-en". the Page NOT Exist!. You are redirect to ~/en/Home.aspx, this page not exit!!!

    I understand that i can change to QueryString and in this case the page is demanded as Home.aspx?language="en" and go to your page in Bg. But now, I use in all my code PathPrefix solution, and my solution make more of 350MB, could you try to understand my problem. I need to use PathPrefix and I have this issue. Could you try to understand my client problem. Try yourselft with and without setting in your navigator plz. Regards

     

  6. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    23 Mar 2009
    Link to this post
    Hello Pierre,

    Please try the following:

    1. Create an external page, and name it Clients.
    2. Point to ~/Client.aspx

    Now, it doesn't matter from which URL you will access the page:
    • http://localhost/36hf/Clients.aspx -> Redirects to http://localhost/36hf/en/client.aspx (your external page is resolved correctly)
    • http://localhost/36hf/client.aspx -> Redirects to http://localhost/36hf/en/client.aspx (your external page is resolved correctly)
    Note that the query string is still there after the redirect.

    If you do not want to use this approach, you could try moving your Client.aspx to a directory named "en". The other thing you could do, is to create an HttpModule, and change the URL depending on your needs.

    I am not sure why you follow this approach though. It brings inconsistency in the localization approach, since obviously you want to have Client.aspx page shared among all translations of the page. If you want to use PathPrefix, then separate your external files in PathPrefix directories as well.
      All the best,
    Georgi
    the Telerik team


    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Register for webinar
6 posts, 0 answered