Several Websites and Several Languages
One Odoo database can run more than one website. Each website has its own name, address, menu, pages, theme and settings, while the products, the contacts and the other records stay shared. This is useful for a company that sells under two brands, or that runs a separate site for each country.
The button + New Website of the settings page opens the window Add Website. It asks for the Website Name, the Website Domain, the Company, the Languages and the minimal karma. The button Create makes the website, and the new site is then designed in the editor like the first one.
A website can be offered in several languages. The button Add a Language of the Theme tab, and the link Install new languages of the settings page, open the window Add Languages. Languages is the field that lists the languages to install, and typing a name, such as French, shows the choices. The box Overwrite Existing Terms replaces the translations that already exist with the standard ones. Websites to translate lists the websites that should receive the language, and the box of each website must be ticked for the site to use it. The button Add installs the language, and Odoo confirms with a message. The buttons are Close and Switch to the language and Close.
A language that is installed is not yet offered on a website. In the settings of the website, the field Languages lists the languages of the site, and the drop down of the field adds the new one. Once a second language is in the list, a field Default appears under it. Website visitors see the version that matches the language of their browser, or the default one when that language is not available.
With a second language active, a language selector appears in the header, next to the currency. The choice of a language opens the same site under a new address that begins with the language code, for example /fr for French.
Odoo translates at once the standard words of the site, such as the names of the menu items Home and Shop, the button Contact Us and the buttons of the cookies banner. The texts that were written in the editor, such as the headline of the home page, stay in the original language until somebody translates them.
In a language other than the default, the button Edit offers two choices. Translate opens the translation mode of the page in that language, and Edit opens the page in the default language for a change of the layout.
Before the translation mode starts, a window explains the colors. Yellow marks the content that still has to be translated, and green marks the content that has been translated. In this mode, only the texts and some elements, such as pictures and documents, can be replaced by a translated version. To change the structure of a page, the master page in the default language must be edited, and each change of the master page is applied to all the translated versions.
Inside the mode, the right panel shows the language to translate into. The list Invisible Elements at the bottom of the panel shows the parts that are hidden on the page, such as the cookies bar, so that they can be translated too.
A text is translated by selecting it and typing the translation over it. The text turns from yellow to green as soon as it has a translation, and the button Save keeps all the translations of the page.
After saving, the page in the new language shows the translated headline together with the standard words that Odoo had already translated, while the texts that are not translated yet stay in the original language. The default language of the site is not changed by this work.