How to configure the default language package and switch multi-language sites in AnQiCMS?

Calendar 👁️ 71

As an experienced website operation expert, I am happy to deeply analyze the powerful functions and practical strategies of AnQiCMS in default language package configuration and multi-language site switching.AnQiCMS is a system designed specifically for content management, and its multilingual support is one of the core advantages for expanding into the global market and serving users of different languages.Understand and properly use these features to give your website wings and accurately reach every target audience.


Configure the default language package in AnQiCMS and easily switch between multilingual sites

In today's global digital age, the multilingual capability of a website is no longer just an optional extra point, but a key element for companies and content operators to reach a broader user base and enhance brand international influence.AnQiCMS is well-versed in this, providing a flexible and powerful multilingual solution that allows you to easily meet the needs of users in different languages.This article will delve into how to configure the default language package in AnQiCMS, as well as how to build and switch between multilingual websites using the multi-site feature.

1. Configure the default language package: lay the foundation for the system language

The default language package configuration of AnQiCMS, which is to set a basic display language for the entire website system.This mainly affects the background management interface, system prompt information, and built-in text content, ensuring that your operations team can operate in the most familiar language during daily work.

You need to log in to the AnQiCMS backend management interface to configure this feature, then navigate to“Background Settings”belowGlobal function settings. Here, you will find a feature named“Default language package”The option. AnQiCMS currently built-in Chinese and English two mainstream language packages for you to choose from.According to the primary working language of your team or the initial setting of the target audience of the website, you can choose the appropriate language package.For example, if your main operations team is located in China, selecting 'Chinese' will ensure smooth background operations;If your team is more accustomed to an English environment, it can be set to "English".

It should be emphasized that the default language package configured here mainly affects the system'sBuilt-in textIt will not automatically translate the actual content of your website articles, product descriptions, category names, etc.The translation and display of website content requires the integration of AnQiCMS's powerful multi-site function to build a truly multi-language site.

II. Building multilingual sites: realizing the globalization of content deployment

The multi-site management capability of AnQiCMS is the core foundation for implementing multilingual websites.Different from simple content translation plugins, AnQiCMS encourages you to set up an independent sub-site for each target language.This architecture not only makes content management clearer, but also provides great flexibility for SEO optimization and user experience.

Imagine that your brand needs to provide services to English and French-speaking users. In AnQiCMS, you do not need to deploy two separate CMS systems, but simply create two independent sites under one AnQiCMS instance, for exampleen.yourdomain.comandfr.yourdomain.com.

The process of creating a multilingual sub-site is usually as follows:

  1. Prepare the domain:Firstly, you need to prepare a corresponding domain name or subdomain for each language you plan to support and have it resolved to your server. For example,en.yourdomain.comFor English sites,fr.yourdomain.comfor the French site.
  2. Add a new site in AnQiCMS:Log in to the default main station backend of your AnQiCMS, find“Multi-site management”function. Here, you can easily click“Add new site”Button. In the pop-up configuration interface, you need to specify a new site“Site Name”/“Site Root Directory”(Suggested to use/app/Start,followed by a domain name without periods and separated by underscores to ensure data is stored independently,as well as the most importantWebsite address(That is the domain name you prepare for the language). At the same time, you can also set up independent administrator accounts, passwords, and databases for each sub-site.
  3. Configure the default language package for the new site:For each language sub-site created, log in again to its independent backend management interface (by clicking the "Access Backend" button in the "Multi-site Management" list), following the method introduced in the first part, in itsGlobal function settingsthe middle of“Default language package”Set to the corresponding language. For example, English site is set to "English", French site is set to "French".
  4. Independent content management:Each sub-site has an independent document, category, page and other content management modules.This means you can create, translate, and publish specialized content for each language site based on the cultural characteristics and market demand of different languages.This 'content independent, system unified' model greatly simplifies the maintenance work of multilingual websites.

In this way, not only do you have multiple language versions of the website, but more importantly, each website can have independent configuration and content in the background, realizing true precision operation.

The third: Implement front-end language switching: Optimize user experience and SEO

After building multiple language sites, the next step is to provide a convenient language switch on the website front end and inform search engines of your multilingual content layout.

  1. UselanguagesLabel-based language switcher:AnQiCMS provideslanguagesLabel, allowing you to easily retrieve the list of all multilingual sites configured.You can use this tag in the website template (usually in the header or footer) to dynamically generate language switch links.

    For example, you can write it like this in your template file:

    {%- languages websites %}
    {%- if websites %}
    <div class="language-switcher">
        <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 %}
    

    This code will iterate through all configured language sites and generate a toggle button for each site containing its language name, icon (or Emoji), and corresponding link.Clicking will take you to the corresponding language version of the website.

  2. UtilizehreflangLabel enhances international SEO performance:To help search engines better understand your multilingual content structure and display the most relevant website version to users in different language regions, configure correctlyhreflangTags are crucial. AnQiCMS'languagesTags can also be used to generate these SEO-friendly metadata. You should place the following code in yourbase.htmlOr other public header template files<head>Inside the tag:

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

    This will generate one for each language site<link rel="alternate" hreflang="xx">wherehreflangThe properties will be based onitem.LanguageAutomatically fill in the corresponding language code (such asen/fr)hrefThe attribute points to the URL of the language site. This effectively guides search engines, avoids duplicate content issues caused by multilingual content, and optimizes the search experience for global users.

  3. Localized translation of built-in template text:For text that does not belong to dynamic content in templates, such as navigation menu items ("Home", "About Us"), prompts on pages, etc., AnQiCMS providestr(translate) tag for localization. You need to create it in the template directory.localesfolders and create corresponding language files for eachYAMLfiles (such aszh-cn/default.yml/en-us/default.yml), where you define the key-value pairs.

    For example, inzh-cn/default.ymldefined:"home": "首页"Inen-us/default.ymldefined:"home": "Home"

    Then use it in the template:{% tr "home" %}The system will automatically display "Home" or "Home" based on the current site language settings. This makes the multi-language switch at the template level extremely efficient and flexible.

Summary

AnQiCMS provides a one-stop multilingual website solution for enterprises and content operation teams with its powerful multi-site management and flexible language configuration capabilities. Whether it is to set up system-level default language packages, or manage and display multilingual content through independent sub-sites, or provide seamless language switching experience and deployment of SEO-friendly on the front end.hreflangLabel, AnQiCMS is known for its concise and efficient architecture, helping you easily expand into the global market and enhance your international brand influence.


Frequently Asked Questions (FAQ)

  1. Ask: Does AnQiCMS support automatic content translation? Answer:AnQiCMS itself does not have built-in automatic translation functionality. Its multilingual strategy is based on the principle of 'content independence and system unity', that is, it maintains a set of independent content for each language version.This means you

Related articles

How to install and deploy AnQiCMS with one click using Baota panel or Docker?

AnQiCMS, this is an enterprise-level content management system built on the foundation of Go language, and it is becoming a powerful assistant for more and more small and medium-sized enterprises, self-media operators, and multi-site management users with its high efficiency, customizable and easy-to-expand features.It is committed to providing a simple and efficient system architecture to meet the diverse needs of content display and management.In the practice of website operation, the convenience of deployment is often an important factor for users in choosing a CMS.Today, as your website operations expert, I will analyze in detail how to use Baota panel or Docker

2025-11-06

How to deploy multiple AnQiCMS instances on the same server?

As an experienced website operations expert, I know that effectively and flexibly managing multiple website instances is one of the key factors for the success of enterprises or individual webmasters in increasingly complex network environments.AnQiCMS, with its efficient architecture based on the Go language and strong multi-site management capabilities, provides an excellent solution for this requirement.When we need to deploy multiple AnQiCMS instances on the same server, we actually have several different strategies to choose from, each with its own focus to adapt to different business scenarios.

2025-11-06

How to install and upgrade AnQiCMS?

AnQiCMS, with its efficient features based on the Go language, flexible and customizable content model, and comprehensive SEO tools, is gradually becoming the preferred choice for small and medium-sized enterprises and content operation teams.To fully utilize the powerful functions of AnQiCMS, understanding how to smoothly install and upgrade is a crucial step.This article will serve as your guide, taking you step by step through the deployment and update of AnQiCMS.

2025-11-06

How to embed mathematical formulas and flowcharts in AnQiCMS templates?

As an expert deeply familiar with website operation, I am willing to elaborate in detail on how to elegantly embed mathematical formulas and flowcharts in the AnQiCMS template.In today's content is king era, high-quality content is not only text, but also visual elements that can clearly convey complex concepts, such as precise mathematical formulas and intuitive flowcharts.AnQiCMS with its excellent flexibility and powerful template engine provides a solid foundation for this.

2025-11-06

Lighting interaction: AnQiCMS website user comment management and display in-depth guide

In the digital age, websites are not only platforms for information release, but also important spaces for user interaction and communication.User comments are an indispensable part of the website content ecosystem, effectively enhancing user engagement, providing valuable feedback to content creators, and even driving the positive effects of search engine optimization (SEO).As an experienced website operations expert, I am well aware of the importance of an efficient and flexible comment management system for website operations.Today, we will delve into how to manage and display user comments on the AnQiCMS website, bringing vitality to your site. AnQiCMS

2025-11-06

What content filtering needs are addressed by the `archiveFilters` tag in AnQi CMS?

As an experienced website operations expert, I know that how to help users efficiently find the information they truly need in the vast ocean of content is the key to improving user experience and website value.AnQiCMS (AnQiCMS) excels in content management, and the `archiveFilters` tag it provides is an important tool for solving this core content filtering need.In today's content-centric era, whether it is a corporate website, e-commerce platform, or vertical industry portal, the amount of content carried by the website is increasingly large.

2025-11-06

How to understand the `archiveFilters` tag in the "document parameter filtering" function of the AnQi CMS template?

As an experienced website operations expert, I am well aware that how to efficiently organize and present information in an increasingly complex content ecosystem, while ensuring that users can easily find the content they need, is the key to enhancing the value of the website.AnQiCMS (AnQiCMS) with its flexible content model and powerful template system, has provided us with many tools to achieve this goal, among which the `archiveFilters` tag is undoubtedly a powerful tool for creating advanced content filtering functions. Today

2025-11-06

How do the `archiveFilters` tag and `archiveList` and `pagination` tags work together to build a complete filter page?

AnQiCMS as an efficient and customizable enterprise-level content management system provides powerful template tag support when building a feature-rich website.Among these three tags, `archiveFilters`, `archiveList`, and `pagination` work together to help us easily build a user-friendly filtering page that allows visitors to quickly locate the content they need.

2025-11-06