Internationalization
ContentBoot offers three modes of multilingual management: field level, document group level, and project level. You can freely combine these three modes according to your needs.
Field Level:suitable for websites where the content structure is consistent between the default language and other languages.
Document Group Level:suitable for websites where the content structure is not consistent between the default language and other languages.
Project Level:suitable for websites where the content structure is not consistent between the default language and other languages. Then published to different domains.
Field Level
It is suitable for websites where the content structure is consistent between the default language and other languages. Field level multilingualism can be achieved by adding or converting multilingual fields in the template.
Enable field internationalization
Select Settings > Internationalization
in project menu,check Enable field internationalization
,then add languages and save.
Template Configuration
Enter the template configuration, then enter the multilingual field configuration, select Transform
tab, check Multilingual
, click Transform
button.
In the transformed field configuration, do configuration for each language.
Document Management
In the document management, this field supports multilingual, you can select different languages.
Publish
For example, a text field, Data Key
is title
, languages are cn
, en
.
JSON data
The value of this field will be published as a object
:
{
"cn": "测试",
"en": "test"
}
GraphQL API
Use language: xx
in the query to specify the required language.
{
homePage(language: cn) {
title
}
}
The value of this field will be published as a string
:
{
"homePage": {
"title": "测试"
}
}
Document Group Level
It is suitable for websites where the content structure is not consistent between the default language and other languages. Document group level multilingualism can be achieved by setting up multi-level document groups.
Project Level
It is suitable for websites where the content structure is not consistent between the default language and other languages. Then published to different domains. Project level multilingualism can be achieved by creating new projects for each language on the website.