0
votes

I'm struggling to implement the multilingual functionality in Umbraco CMS version 7.5, currently i see 2 possible solutions:

1- Use only one root path

I think the best package as a complement for this solution is "Vorto", all I have to do is create new data types which extends the vorto data types and I can start edit texts directly on document types.

2- Use multiple root path

The idea is to duplicate the main root path for each language.

-> I followed a lot of tutorials on the web but they all relate on previous versions of Umbraco and the solutions i found seem not working with the current version... Once i duplicate the root path and i associate the language to the root folder, what's the next step ?

I have a few more questions:

  1. Do you have a better solution than the 2 on top ?
  2. How Umbraco knows the client language ? Does it take the first language in the header "Accept-language" in the HTTP request ?
  3. How could i extend the default routing to add the language as the first part, for example: http://domainName.ext/language/....

Thank you by advance !

3

3 Answers

3
votes

Both scenarios have their pros and cons and both are widely used in the Umbraco community / solutions. I prefer 2nd solution, as especially on larger sites it gives you ability to restrict access for different language editors for example and not each site has a requirement to be 1-1 content structured.

There is an Umbraco TV episode covering this topic here: https://umbraco.tv/videos/umbraco-v7/implementor/multi-lingual/creating-a-multi-lingual-site/introduction/.

In summary:

  • you need to create copy of your root language node
  • then setup the culture for it
  • use dictionary items to translate static content for each language
  • create simple language picker choosing related site or just redirecting to selected language root

Regarding your questions:

Ad.1. I don't have :)

Ad.2. It's selecting culture set up on the node(s), so it may be forced. Other than that it use standard .NET culture detection, so yes - it's using "accept-language" headers.

Ad.3. There is a key "umbracoHideTopLevelNodeFromPath" which enables you to include top level roots in the url paths. Read more: https://our.umbraco.org/documentation/reference/config/webconfig/

And still, if you prefer to go with option 1, there is an awesome article about it with example code as well: http://24days.in/umbraco/2015/multilingual-vorto-nested-content/. I will be playing with it now too! :)

1
votes

Well, the easiest way for option 2 to work would be to make a tree structure like this:

Root

  • LanguageA
  • LanguageB

If you want the domain.ext/language/ URL, set the domain.ext on the Root node and set the language on each of the Language Nodes. You can also set both domain and language on each of the language nodes to get (for instance) domainname.com for one and domainname.net for the other.

This way of doing it shouldn't have changed lately.

0
votes

With regards to you first point, there IS another way coming, but not for a while. Umbraco 8 (due Q1 2017) will support the concept of page variants, which means you can have a single tree and then a variant for each different language, negating the need for stuff like Vorto.

It's still early days though, so we'll have to wait and see how well the feature works!