Hi there! Internet Explorer is no longer supported.

Please use a modern web browser such as Firefox, Chromium or Edge. Thank you!

Translations and Languages

Translate content and configure locales for the website.

Nota

Esta página ainda não foi traduzida, portanto, a versão em inglês é usada. Interessado em ajudar? Contribuir

The FreeCAD website and the Trigo theme support multiple languages using Hugo’s multilingual mode.

Enable multi-language

To make the Hugo project multi-language, configure the supported languages:

hugo.yaml
defaultContentLanguage: en
languages:
  en:
    label: English
    weight: 1
  fr:
    label: Français
    weight: 2
  ja:
    label: 日本語
    weight: 3
Nota

Before a new language is enabled, the main sections and navigation pages (Homepage, Features, Download, News, Community, Documentation and Donate) and the Theme strings must be translated.

Want to add a new language? Please use the provided feature issue template indicating who will translate and proof-read/review.

Manage content translations

Hugo supports multiple approaches to managing translations. The FreeCAD website currently uses the translation by content directory.

Translation by content directory

Each locale has its own content directory as configured by their contentDir parameter.

The current FreeCAD website configuration defined separate root content directories for each locale:

This allows to use content mounts in the project configuration, where missing translated content uses the default language site as fallback (i.e. en for English).

Translation by filename

Hugo also supports managing translations by filename. With a file content/docs/_index.en.md in English, the file content/docs/_index.fr.md contains the French translation. This approach is currently not used for the FreeCAD website.

Theme strings translations

To translate theme strings, i18n translation tables are used. YAML data files for each locale are stored in the i18n directory and define the string identifier and the translated value.

i18n/fr.yaml
- id: title
  translation: "Titre"

Reference