Today, with the deepening of globalization, enterprises and content operators often need to reach users from different language backgrounds.A high-efficiency content management system, if it can simplify the release and management of multilingual content, it will undoubtedly greatly enhance operational efficiency.AnQiCMS provides a very practical solution at this point, helping users easily switch and correctly display multilingual content.

The core concept of building a multi-language site with AnQi CMS

A safe CMS views multilingual support as one of its core features, aiming to help businesses expand into international markets and make content directly accessible to users of different languages.It is not just about adding a few language fields to each article, but rather adopting a more extensible and independent strategy - carrying different language versions of content through 'multi-site management'.This means that each language version can be considered as an independent website or content collection, with its own content, categories, and settings, but all of this can be unifiedly managed from the same safe CMS backend.

The benefits of this design are obvious: content in different languages can be updated and maintained independently, without interfering with each other, which is particularly suitable for operation teams that have high customization requirements for content in various languages.It avoids confusion that may arise from a single content structure in a multi-language scenario, and also reserves flexibility for future more complex internationalization content strategies.

Management and publication of multilingual content: from backend to frontend

When deciding to add multilingual support to a website, you first need to create a site for the corresponding language version in the 'Multi-Site Management' feature of the Anqi CMS backend. For example, you can create a site for English usersen.yourdomain.com【en】Create a site for Japanese usersjp.yourdomain.com.Each new site will have an independent backend management entry (of course, you can access it one-click through the multi-site management list of the main site), and can independently publish, edit articles, products, pages, and other content.

In content creation, you will as usual write articles and upload images in the corresponding language site backend.All content (including title, text, keywords, description, etc.) will be entered in the language of the site.This ensures the accuracy of the content and the matching of context, avoiding the unnaturalness that may be brought by machine translation.

How can different language versions be switched on the front end of a website after the multi-language content is ready, and displayed correctly to the user?The AnQi CMS provides us with flexible solutions through its powerful template tag system.

Firstly, in the website template, we can use{% languages websites %}Translate this content to obtain the list of all configured multilingual sites by using a tag.This tag will return an array containing information about each language site, and we can iterate over this array to build a language switcher.item.LanguageName)、language code(item.Language)and the corresponding link(item.Link),Even choose to display language corresponding Emoji expression (item.LanguageEmoji)or custom icon (item.LanguageIcon),making the switcher more intuitive and beautiful.

Users can simply click on the corresponding language link to jump to the website page of the corresponding language version, and the system will automatically recognize and display the content in that language.

In addition, to better guide search engines, the Anqi CMS also supports inserting into templateshreflangtags. In the web page's<head>In a block, by traversing the multi-language site list, we can generate one for each language version.<link rel="alternate" href="{{item.Link}}" hreflang="{{item.Language}}">Label.This tells the search engine which other language versions the current page has, along with their corresponding URLs, thereby helping the search engine display the correct language content to the target user, improve SEO performance, and avoid duplicate content issues.

Differentiate the language mechanism of the CMS: management, content, and interface.

When operating multilingual with the AnQi CMS, understanding its different language processing mechanisms is crucial:

  1. Language package of the background management interface:The AnQi CMS provides default language package support, such as Chinese and English.This setting mainly affects the text display on the backend interface, such as menu items, button text, etc.It facilitates the operation of the backend for administrators from different countries or regions, but it will not automatically affect the language of the articles, products, and other content displayed on the front-end.

  2. Translation tags for template static text:For statically encoded static text in website templates, such as navigation menu items like 'Home', and the 'Contact Us' in the footer, Anqi CMS provides{% tr "yourLocation" %}[en] Such translation tags. By setting in the template directorylocalesthe corresponding folder andymlTranslate the file, we can provide multilingual translations for these static texts.When the user switches the language, the text wrapped by these labels will display the corresponding translated text based on the current language environment.This is independent of the core content's multilingual support, but together they build a complete multilingual user experience.

  3. multi-site management of core content:As mentioned earlier, the multilingual implementation of core content such as articles, product descriptions, etc. is achieved by creating different language sites.Each language site maintains a separate database of content, ensuring the accuracy and customization of the content.

Summary

The multi-language function of AnQi CMS differentiates through the integration of the core strategy of 'multi-site management', flexible template tags, and detailed language mechanisms, providing powerful and practical support for the internationalization operation of the website.It allows content publishers to focus on creating content in different languages without being troubled by complex underlying technical details.Whether it is to centrally manage global brand sites or simply want to reach a wider audience, Anqi CMS can provide a set of efficient and easy-to-operate solutions.


Common Questions (FAQ)

1. How is the multilingual content of AnQi CMS implemented, is it automatically translated or do you need to enter it manually?The multilingual content of Anqi CMS is achieved through "Multi-site Management", which means each language version is treated as an independent site, and its content (including articles, products, pages, etc.) needs to be managed in the backend of the corresponding language site.Manual entry and management.The Anqi CMS itself does not provide automatic translation of content. This is done to ensure the accuracy of translation, the match of context, and the localization quality of content, to avoid errors that may be brought by machine translation.

2. How to ensure that my multilingual website performs well in search engines and displays the corresponding language content for users of different languages?To optimize the search engine performance of multilingual websites and ensure that search engines can correctly identify and display different language versions, it is recommended to correctly use in the website template's<head>block.hreflangTag. You can use the tags provided by Anq CMS.{% languages websites %}Tag to traverse all language sites and generate one for each site.<link rel="alternate" href="{{item.Link}}" hreflang="{{item.Language}}">This tag will explicitly tell search engines the corresponding other language version URL of this page, which helps to avoid duplicate content penalties and guide users to the version most suitable for their language.

3. Can anQi CMS translate only some fixed elements on the website (such as navigation menus, footer text) and not all article content?Yes, AnQi CMS can meet this requirement. For fixed, non-dynamically loaded text elements in website templates (such as navigation link names, button text, copyright statements, etc.), you can use{% tr "keyName" %}Translate label. By configuring different languages in the directory where the template file is located.localesUnder the directory.ymlTranslate the file, you can provide corresponding multi-language translations for these static texts without creating separate language sites to host this content.