翻譯

您的网站将以与访问者浏览器相匹配的语言显示。如果浏览器的语言尚未安装并添加到您的网站,则内容将以 默认语言 选择自己喜欢的语言。

您网站上的 翻译 功能可自动翻译标准术语,并为手动内容翻译提供工具。

安裝語言

要允许翻译您的网站,您必须首先 安装 所需语言并将其添加到您的网站。要执行此操作,请访问 网站 ‣ 配置 ‣ 设置 并点击 网站信息 部分中的 安装语言。在打开的对话框中,从下拉菜单中选择所需的 语言,勾选所需的 要翻译的网站 网站,然后点击 添加

要编辑网站语言,请访问 网站 -> 配置 -> 设置,然后在 网站信息 部分的 语言 字段中添加/删除所需语言。

小訣竅

Alternatively, once the languages have been installed, you can add them from the language selector. You might then need to refresh your page to see the new language.

預設語系

When multiple languages are available on your website, you can set a default language to be used if the visitor’s browser language is not available. To do so, go to Website –-> Configuration -–> Settings, and select a language in the Default field.

備註

This field is only visible if multiple languages have been installed and added to your website.

Language selector

Your website’s visitors can switch languages using the language selector, available by default in the Copyright section at the bottom of the page. To edit the language selector menu:

  1. Go to your website and click Edit;

  2. Click the language selector available in the Copyright block and go to the Copyright section of the website builder;

  3. Set the Language selector field to either Dropdown or Inline. Click None if you do not want to display the Language selector;

    Add a language selector menu.
  4. 按一下 儲存

小訣竅

You can also add the Language Selector to the Header of your page. To do so, click the Header block and go to the Navbar section to edit the Language Selector.

Translate your website

Select your desired language from the language selector to see your content in another language. Then, click the Translate button in the top-right corner to manually activate the translation mode so that you can translate what has not been translated automatically by Odoo.

Translated text strings are highlighted in green; text strings that were not translated automatically are highlighted in yellow.

Entering the translation mode

In this mode, you can only translate text. To change the page’s structure, you must edit the master page, i.e., the page in the original language of the database. Any changes made to the master page are automatically applied to all translated versions.

To replace the original text with the translation, click the block, edit its contents, and save.

備註

When a website supports multiple languages, the content is accessible through different URLs, depending on the language selected. For example, https://www.mywebsite.com/shop/product/my-product-1 is the URL to the master page, in English, while https://www.mywebsite.com/fr_FR/shop/product/mon-produit-1 is the URL to the French version of the same page.

小訣竅

Once the desired language is installed, you can translate some items from the backend (e.g., the product’s name in the product form). To do so, click the language code (e.g., EN) next to the text you want to translate and add the translation.

Content visibility by language

You can hide content (such as images or videos, for example) depending on the language. To do so:

  1. Click Edit and select an element of your website;

  2. Go to the Text - Image section and Visibility;

  3. Click No condition and select Conditionally instead;

  4. Go to Languages to configure the condition(s) to apply by selecting Visible for or Hidden for, and click Choose a record to decide which languages are impacted.