I have been reading several articles on best practice for setting up an international site.
I am developing a site in 2 languages:
US English
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
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.
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:
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
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 aGetCulture()
extension method onIPublishedContent
you can access.is working on a reply...
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.