Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Dan Evans 631 posts 1018 karma points
    Jul 07, 2016 @ 10:53
    Dan Evans
    0

    Best practice for an international site

    I have been reading several articles on best practice for setting up an international site.

    I am developing a site in 2 languages:

    1. US English
    2. Rest of the world English

    I am planning on structuring the site as

    www.sitename.com/en-US www.sitename.com/en

    My question is do I need to use Umbraco's culture/hostname settings?

    I have set each sub-directory to the correct culture but I can't see this being output in the http headers? Is this to be expected? What value is there in settting the culture? I am setting the domain at the top level.

    I will need some sort of international landing page for the top level but would ideally like to auto-redirect users to the correct home page based o their browser language

  • Dan Diplo 1554 posts 6205 karma points MVP 6x c-trib
    Jul 07, 2016 @ 11:31
    Dan Diplo
    0

    Yes, you should use Umbraco#s culture hostnames.

    First thing to do is ensure that in Settings > Languages you have created the languages you want (English (en) and English US (en-US)).

    Then you want to create two home page nodes at the root (directly under content). You can then right-click on each home node and select the Culture and Hostnames option. Set the appropriate hostname and culture/language.

    I don't believe the culture is sent in the HTTP headers, but it can be accessed in a Razor script via the Culture property of the page. There's also a GetCulture() extension method on IPublishedContent you can access.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies