#1 April 18, 2016 7:31am

Terra-IT
Member
Registered: April 18, 2016
Posts: 10

Website in different languages

Hi,

We at Terra-IT have been using Bigtree for a while now and are surprised by the quality of this CMS. For a client we are building a website now that needs to be in different languages (in the front-end) like Dutch, English and German. We have been looking in the developer guide and have some ideas for our selves on how to solve this problem the best way. But at this point we are asking ourselves if this has been done before and what is the best way to do this in Bigtree? Thank you.

Offline

#2 April 18, 2016 8:51am

timbuckingham
Administrator
From: Baltimore, MD
Registered: April 2, 2012
Posts: 974

Re: Website in different languages

We've done this a few different ways before. The easiest way to do it is to have a different page tree for each language and use the "Trunk" option at the root of each language tree so that the breadcrumb renders properly (i.e. French -> About Us will render as just About Us if French is set to trunk). Another option is to have duplicate fields for each language and then use a cookie to determine which resource to draw in your page templates. A third option is to hack your /core/router.php file to route to a different route trunk depending on which cookie/session language has been chosen (this would be the least favorable option but is the only way to not have an additional URL route -- i.e. you could have /about-us/ serve all the different languages that would normally be served at /de/about-us/, /en/about-us/, etc).

As far as what I prefer, I would go with the first option as it's the easiest to get right smile You can use a cookie to determine what the "parent" should be for each language and use that for getNavByParent to pull top level nav. Then with the breadcrumb reading the trunk it should draw that properly. The rest is just making sure you enter the right language in the right page tree.

For module content it's pretty much additional fields for each language, unfortunately.

Offline

#3 April 18, 2016 9:31am

Terra-IT
Member
Registered: April 18, 2016
Posts: 10

Re: Website in different languages

Thank you for your reply. Much appreciated, thanks for the tips and we will discuss those options here. smile

Offline

Board footer

Powered by FluxBB

The Discussion Forum is not available on displays of this size.