How to configure and use the multi-language support function of AnQiCMS?

Calendar 👁️ 55

In the current global digital environment, a website that can support multiple languages can undoubtedly greatly expand its user base and enhance brand influence.AnQiCMS (AnQi Enterprise Content Management System) is an efficient tool designed specifically for enterprise-level content management, naturally understanding this path, and providing a comprehensive and flexible multi-language support function.As an experienced website operation expert, I will guide you to understand how AnQiCMS implements multi-language configuration and usage, helping your website go international.

The core concept of AnQiCMS multilingual support

In AnQiCMS, multilingual support is not just a simple translation of all text, but takes a layered, flexible strategy.It divides the multilingual needs of the website into several levels: system interface language, translation of fixed text in templates, and the most core, business content carrying multilingual site management.Understanding this core concept is the key to efficiently configuring and using the AnQiCMS multilingual function.

In short, AnQiCMS encourages the management of content in different languages (such as articles, product details, single pages, etc.) on independent sites, which complements its 'multi-site management' function.At the same time, for the back-end operation interface, system prompt information, and some fixed text in the template that does not change with the content, it is implemented through built-in language packages and template translation tags.

Specific steps to configure and use the multilingual feature of AnQiCMS

Step 1: Establish a multilingual site architecture

The mainstream way AnQiCMS handles multi-language content is through the "Multi-Site Management" feature.This means that if you plan to have a Chinese version and an English version of the website, it is usually necessary to establish an independent website for each language version.The benefit of doing this is that each language site can have its own domain, its own content, its own SEO optimization strategy, and they do not interfere with each other, making management clearer.

In the AnQiCMS backend, you can easily add new language sites through the 'Multi-site Management' module. When creating a new site, you can configure a separate domain for it (such asen.yourdomain.comoryourdomain.com/en/),and specify a default template. Although the content is independent, these sites all share the same AnQiCMS core program and database, which greatly simplifies the complexity of deployment and maintenance.

Operation tips:When adding a new site, make sure to specify a default language pack that matches the language (such as English for an English site), which will affect the new site's backend interface and some system prompt languages.

Step 2: Configure default language package and backend language

AnQiCMS includes various language packages for translating the back-end operation interface, system prompts, and some public text that does not belong to the article content.You can find the 'Default Language Pack' option under 'Global Settings' in the 'Background Settings'.

When you select a specific language pack (such as "English") for a site, then the site's backend management interface will display in English, and built-in system-level text like "Read more", "Latest articles" will also switch to English.

Important note:This default language pack mainly affects the system-level text.The specific business content such as article title, body, category name, etc. will not be automatically translated.This content needs to be translated independently on each language site.

Step 3: Use the template to translate tags({% tr %})

For some hard-coded text in the website front-end template that does not change with the article content (such as the navigation menu items "Home", "Contact Us", and the copyright statement "All rights reserved" etc.), AnQiCMS provides{% tr %}Translation tags. This makes the UI text translation of the template very efficient.

To use this feature, you need to create a file named under the root directory of the current template.localesThe folder. In this folder, create a subfolder for each language (such aszh-CNrepresenting Simplified Chinese,en-USrepresenting American English). In each language folder, create anotherdefault.ymlA file used to store translation text in key-value pairs.

Example:Suppose there is a fixed text 'Your location' in your template.

  1. Create a language file: template/your_template_name/locales/zh-CN/default.yml
    
    yourLocation: "您的位置"
    
    template/your_template_name/locales/en-US/default.yml
    
    yourLocation: "Your location"
    
  2. Use in the template:In your HTML template file (such asbase.htmlorheader.htmlIn it, you can use{% tr "yourLocation" %}Translate. When the user visits the Chinese site, it will display 'Your location'; when visiting the English site, it will display 'Your location'.

This way allows the static text in the front-end template to dynamically switch according to the language set by the current site, without the need to maintain a separate template file for each language.

Step 4: Implement language switching between sites and SEO optimization

To allow users to easily switch between different language versions and for search engines to correctly identify multilingual content, you need to add a language switcher to the template and utilizehreflangLabel for SEO optimization. AnQiCMS provides{% languages %}tags to get the list of all configured multilingual websites.

  1. Create a language switcher:You can use it in your template file (usually in the header or footer){% languages websites %}Label to iterate over all language sites and generate switch links.

    {%- 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}} {# 如果有语言Emoji #}
            {% endif %}
            {{item.LanguageName}}
        </a>
        {%- endfor %}
    </div>
    {%- endif %}
    {%- endlanguages %}
    

    This code will list all multilingual sites and generate links for each site, so that users can click and jump to the corresponding language website.

  2. Implement hreflang tags: hreflangTags inform search engines that your website has pages in different languages or regions, which is an important SEO element. It can effectively prevent multilingual content from being misjudged as duplicate content. You should place these tags on every page of your website.<head>Section.

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

    item.LinkIt will generate URLs for each language version,item.Languagethen it generates the corresponding language codes (such aszh-CN,en-US)。This way, search engines can accurately understand your multilingual content structure and display the most relevant pages to different language users.

Content operation strategy considerations

Once the multilingual infrastructure is set up, content operators should note that:

  • Content independent:Maintain the independence of content on each language site. Although the themes may be the same, translation is not just a literal conversion and needs to consider cultural context and localization habits.
  • SEO localization:Conduct keyword research for each language market and optimize the corresponding page titles, descriptions, and content.
  • Update synchronization:Establish a reasonable content update process to ensure that all language versions of the content are updated in a timely manner and maintain consistency of information.

The multilingual support feature of AnQiCMS, through multi-site management combined with a flexible template translation mechanism, provides an efficient and scalable global content management platform for enterprises and operations teams. Mastering these configuration and usage skills will enable your website to better serve the global market.

Related articles

How does the content model of AnQiCMS achieve high customization to meet different business needs?

## AnQiCMS' content model: empowering highly customized business scenarios As a seasoned veteran in website operations for many years, I am well aware that the "skeleton" of the content management system (CMS) - the content model, has a decisive impact on the flexibility and scalability of a website.In a rapidly changing business environment, if the CMS content structure is stuck in its ways, the innovation and expansion of the business will be restricted everywhere.

2025-11-07

How to create and manage multiple independent websites in AnQiCMS?

As an experienced website operations expert, I am well aware of the importance of efficiently managing multiple websites in an increasingly complex online environment for corporate brand building and content marketing.AnQiCMS (AnQiCMS) boasts excellent performance and rich features, making it an ideal choice for many small and medium-sized enterprises and content operation teams.Today, let's delve into how Anqi CMS can help you easily create and manage multiple independent websites.

2025-11-07

What are the technical advantages of AnQiCMS in handling high concurrency access?

## Tackling the Digital Deluge: AnQiCMS's Technical Proficiency in High-Concurrent Access In today's ever-changing digital world, websites act as a bridge of communication between enterprises and users.Especially for small and medium-sized enterprises and content operation teams, how to ensure that the website remains smooth and stable during high traffic and high concurrency access is a key link to the success of website operation.

2025-11-07

How AnQiCMS helps small and medium-sized enterprises and content operations teams improve efficiency?

In today's highly competitive digital environment, small and medium-sized enterprises and content operations teams are seeking smarter and more efficient tools to meet the rapidly changing market needs and maximize the value of content.Traditional CMS systems are often cumbersome and complex, or lack sufficient functionality, making it difficult to truly meet the needs of efficient operation.AnQiCMS is a corporate-level content management system dedicated to solving these pain points, it brings real efficiency improvement to users through a series of innovative functions and technical advantages.

2025-11-07

What help does the pseudo-static and 301 redirect function provided by AnQiCMS have for SEO optimization?

## AnQiCMS's URL Magic: How Can 301 Redirects and Static URLs Boost Your Website's SEO?In today's digital marketing battlefield, whether a website can stand out is crucial, not only for high-quality content itself, but also for its technical foundation and content operation strategy.For those small and medium-sized enterprises and self-media operators who want to efficiently manage content and optimize SEO, the pseudo-static and 301 redirect features provided by AnQiCMS (AnQi content management system) are undoubtedly the two major treasures to enhance the visibility of their website in search engines.

2025-11-07

How to use the content collection and batch import function of AnQiCMS to quickly fill the website content?

Good, as an experienced website operation expert, I will combine the powerful functions of AnQiCMS and deeply analyze how to efficiently use its content collection and batch import features to quickly fill and optimize the website content.Goodbye繁琐,AnQiCMS helps you take a step ahead in content: In-depth analysis of collection and batch import function In today's ever-changing digital world, the freshness and richness of website content are crucial for attracting users, improving SEO performance, and consolidating brand image.However, the creation of original content often takes time and effort

2025-11-07

What advanced SEO tools are built into AnQiCMS to improve website ranking?

As an experienced website operations expert, I know that in today's highly competitive online environment, whether a website can stand out largely depends on the performance of its search engine optimization (SEO).AnQiCMS (AnQiCMS) deeply understands this, it is not only an efficient content management system, but also seamlessly integrates a series of powerful advanced SEO tools into its core functions, aiming to help users improve the visibility and ranking of their websites in search engines from content creation to technical implementation level.Next, we will delve into these advanced SEO tools built into AnQiCMS

2025-11-07

What scenarios are suitable for the site-wide content replacement function

As an experienced website operations expert, I am well aware that efficient and flexible content management is the foundation of a successful website in an increasingly complex content ecosystem.AnQiCMS is an enterprise-level content management system developed based on the Go language, which brings significant value to many small and medium-sized enterprises and content operation teams with its lightweight and efficient features.Among its many powerful features, the 'Full Site Content Replacement' function is not often mentioned, but it can become a 'secret weapon' to solve operational pain points and greatly improve work efficiency in specific scenarios.Then, this seemingly simple "full-site content replacement" function

2025-11-07