What multilingual content configurations and switching methods does AnQiCMS support?

The multilingual content configuration and switching of AnQi CMS: helping your website go global

In the wave of globalization, the multilingual capability of a corporate website is no longer an option, but the cornerstone of business expansion.For businesses aiming to reach global users and engage in cross-cultural content distribution, a content management system that supports multilingual capabilities is crucial.AnQiCMS is a system tailored for small and medium-sized enterprises and content operation teams, offering flexible and efficient configuration and switching methods for multilingual support. It aims to help users easily achieve global promotion of content.

Understanding how AnQiCMS handles multilingualism, we can break it down into several levels: the language of the system interface, the translation of fixed text in templates, and the most core aspect—the language version management and switching of actual website content.

1. Default language configuration of the system interface

Firstly, AnQiCMS provides a basic 'default language package' setting, which is mainly reflected in the system's backend management interface, as well as some built-in, non-user-generated text prompts.You can find and select the default language of the website in the [Global Function Settings] on the backend. Currently, the system has built-in Chinese and English languages.Select, these system-level texts will be correspondingly switched.

However, it should be emphasized that this setting only affects the interface language of the system itself.It does not automatically translate the articles, products, pages, and other user-generated content you post on the site.This is to ensure the accuracy and professionalism of the content, avoiding errors that may arise from machine translation.For actual website content, we need to adopt a more refined management strategy.

2. Translation mechanism of fixed text in templates

In the frontend display of the website, in addition to dynamic content, there are a large number of navigation names, copyright statements, button texts, and other fixed texts. AnQiCMS has introduced{% tr %}【en】Translate label, allowing you to easily handle multilingual processing of static text in these templates.

The principle of its operation is that you need to create a directory under the template directory.localesFolder, and create corresponding subdirectories for each language (such aszh-cn/en-us)。Each language subdirectory contains adefault.ymlfile that defines the translation content of key-value pairs. For example, in Chinesedefault.ymlYou can define in Chinese"yourLocation": "您的位置"and in Englishdefault.ymlis defined in"yourLocation": "Your location"Then in the template, you just need to use{% tr "yourLocation" %}Tags, the system will automatically display the corresponding translated text based on the language version accessed by the current user.This greatly facilitates the internationalization development of templates, allowing the front-end page to seamlessly adapt to different language environments.

3. Management strategy for multilingual website content

The AnQi CMS provides strong flexibility in managing multilingual content, especially through itsMulti-site managementfunctionality, offering a structured solution for building global websites.

A. Based on multi-site implementation for completely independent multilingual content

This is the recommended and most comprehensive multilingual content management method by AnQiCMS.By using the multi-site feature, you can create an independent sub-site for each language version.www.example.comCorresponding to the Chinese siteen.example.comEven the English sitefr.example.comAnd the French site.

Each sub-site can have:

  • An independent domain name or subdomain:Easier for users to identify and optimized for search engines.
  • Independent backend management:Administrators can focus on content operations in specific languages.
  • Independent content:Each article, product, single page, and other content in every language is independent and can be customized for the target audience rather than being simply translated.This means you can publish completely different content or perform deep localization for different cultural backgrounds and market preferences.
  • Independent template:Even design different interface styles for websites in different languages, providing a more targeted user experience.
  • Independent SEO configuration:Each language site can have its own keyword strategy, TDK settings, to better serve the international SEO goals.

The advantage of this method lies in the high isolation of data between different language versions, clear management, and the ability to adapt to the complex needs of global operations to the maximum extent.

B. Manage local multilingual content through custom fields (additional options))

Although multilingual sites are the recommended solution, in certain specific scenarios, if you only need to target the content ofPart elements[for example, product name, short description, etc.] for multi-language display, and at the same time, you want these contents to be associated with the same product or article subject, then consider using the flexible AnQiCMS.Custom fields of the content modelFunction.

For example, you can add in the product modelProductName_en/ProductDescription_enEnglish product names and descriptions are stored using custom fields.In the template, determine and display the corresponding field content based on the current language environment.This approach is suitable for translation needs that are not complex, or for those who wish to manage all language content under the same content entry.For large-scale translation of the entire article or page, the multi-site solution is still the better choice.

4. Front-end Language Switching and SEO Optimization

In order to facilitate users to switch between different language versions, AnQiCMS provides{% languages %}Label.This tag can retrieve and list all configured multi-language site information, including language name, language code, link address, language icon (such as Emoji or custom image), etc.

You can use the header, footer, or sidebar of the website, among other locations,{% languages %}Build a language switcher easily. For example, traverse all language sites and generate a link and corresponding language identifier (such as a flag icon or language abbreviation) for each site.

{%- languages websites %}
{%- if websites %}
<div>
    <span>切换语言:</span>
    {%- for item in websites %}
    <a href="{{item.Link}}">
        {%- if item.LanguageIcon %}
        <img src="{{item.LanguageIcon}}" alt="{{item.LanguageName}}" />
        {%- else %}
        {{item.LanguageEmoji}}
        {% endif %}
        {{item.LanguageName}}
    </a>
    {%- endfor %}
</div>
{%- endif %}
{%- endlanguages %}

In addition, for the SEO of multilingual websites,hreflangcorrect use of tags is crucial. AnQiCMS through{% languages %}Tags can also easily achieve this function, helping search engines understand that your website has multiple language versions and index them correctly for users in different language regions.

{%- languages websites %}
{%- for item in websites %}
<link rel="alternate" href="{{item.Link}}" hreflang="{{item.Language}}">
{%- endfor %}
{%- endlanguages %}

Place this code in the HTML<head>block to effectively enhance the search engine visibility of multilingual content.

In summary, AnQiCMS provides a comprehensive and practical solution for building global multi-language websites by distinguishing system languages, offering template static text translation tags, and focusing on its powerful multi-site management capabilities. It is complemented by flexible frontend language switching tags and SEO optimization support.Whether it is a simple language switch or complex localization content operation, AnQiCMS can help you a hand.


Common Questions (FAQ)

Q1: Can I create multiple language versions of the same article in AnQiCMS and manage them centrally in the backend?

A1:AnQiCMS mainly supports multi-language content through its "Multi-site Management" feature.This means, in most cases, you would create a separate site for each language (e.g., Chinese, English)Each site's content is independent and can be managed on their respective backends.Although this method does not centrally manage all language versions under a single content item, it provides more thorough content localization and management flexibility.For the translation of a few local fields, customization of fields can be achieved, but for the large-scale translation of an entire article or page, the standalone site mode is more common and easier to manage.

Q2: Will my website content be automatically translated into the corresponding language after setting the "default language package"?

A2:Will not.The "Default Language Pack" feature mainly affects the language of the AnQiCMS backend management interface, as well as some system-built text prompts.It will not automatically translate the actual user-generated content you post on the site, such as articles, products, custom pages, etc.{% tr %}Use tags to handle fixed text strings.

Q3: If I use the multi-site feature to manage different language versions, are the data between the sites shared, such as user data or product inventory?

A3: