AnQiCMS provides powerful multilingual support capabilities, which is crucial for websites looking to expand into global markets and provide localized content experiences for users of different languages.It not only affects the presentation of website front-end content, but also provides users with a smooth language switching experience.Understanding how it works can help us better plan and operate multilingual websites.
In AnQiCMS, multilingual support is mainly reflected in two aspects: first, the translation of fixed texts in system-built texts or templates, and second, the independent management and display of actual content (such as articles, products, single pages, etc.)These two together constitute the multilingual experience of the website.
Firstly, for the static text on the website interface, such as navigation menu items, copyright information, form prompts, etc., AnQiCMS provides a convenient translation mechanism. We can create it under the template directory.localesFolder, and configure it independently for each language.ymlto create translation files. For example, create one for Chinesezh-CN/default.yml, and one for Englishen-US/default.yml. In these files, we can define key-value pairs, such as"yourLocation": "您的位置"and"yourLocation": "Your Location". When used in the front-end template{% tr "yourLocation" %}When such a label is used, the system will automatically display the corresponding translation text based on the currently selected language.In addition, the default language package setting in the AnQiCMS backend also ensures that some built-in prompts or general text can be switched according to the selected language, providing a unified language environment for administrators and visitors.
Secondly, and more importantly, AnQiCMS manages dynamic content in a 'multi-version' rather than 'auto-translation' manner.This means that if we need to provide both Chinese and English versions of a product introduction, we need to create two separate product contents, one written in Chinese and the other in English.Although this may sound like extra work, it ensures the accuracy and authenticity of the content, and allows different language versions to have independent SEO titles, keywords, and descriptions, as well as the ability to differentiate content for different markets.This strategy is highly flexible, avoiding the stiffness and inaccuracy that machine translation may bring, allowing us to provide high-quality, native reading experiences for users of each target language.By AnQiCMS content model and flexible publishing features, we can easily manage these different language versions of content.
AnQiCMS provides a convenient way for visitors to switch between different language versions,{% languages websites %}Label. This tag will retrieve the list of all configured multilingual site lists. In the front-end template, we can iterate overwebsitesvariables and useitem.LinkGenerate links to different language versions while utilizingitem.LanguageName/item.LanguageEmojioritem.LanguageIconTo display the language name or icon. This allows visitors to easily switch to their preferred language version by simply clicking a button or dropdown menu, greatly enhancing the user experience.
In addition, an important SEO strategy for implementing a multilingual website is to usehreflangtags. AnQiCMS also uses{% languages websites %}tags, which can conveniently generate<head>these in the partshreflangLink. For example, by traversingwebsitesand output<link rel="alternate" href="{{item.Link}}" hreflang="{{item.Language}}">It can clearly inform search engines that the specific page of the website has other language or regional versions, thus avoiding duplicate content issues and ensuring that the correct language version of the content is displayed to the corresponding users.This is crucial for improving a website's visibility and ranking in international search results.
In summary, AnQiCMS's multilingual support is achieved through template-level translation of static text and independent management of dynamic content,配合flexiblefront-end language switching labels and SEO-friendlyhreflangA mechanism has been jointly developed to build an efficient, customizable global content publishing platform. It grants website operators a high degree of freedom to meet the diverse needs of different markets and users.
Frequently Asked Questions (FAQ)
Does AnQiCMS automatically translate my website content?AnQiCMS does not provide automatic content translation functionality.For articles, products, single pages, and other dynamic content, you need to manually create and manage independent content versions for each language.For example, if you have a Chinese product page, you need to create a separate English version of the product page and manually translate and enter the content.This ensures the accuracy and professionalism of the content, better serving the target users.
How can I set different URL structures for each language?AnQiCMS' multilingual content management is typically combined with its multilingual site management features. You can set up an independent site for each language (for example
zh.yourdomain.comanden.yourdomain.com),or by configuring different URL prefixes for content in different languages (such asyourdomain.com/zh/article/andyourdomain.com/en/article/In the background, when configuring multiple sites, you can specify the domain and content root directory of each site to achieve different URL structures.hreflangWhat is the role of tags, and how should I use them?hreflangThe tag is an important SEO attribute that tells search engines that your website has different language or regional versions of content. Use it correctlyhreflangIt can help search engines display the correct language content to the right users, avoid duplicate content issues, and improve the international SEO performance of a website. In AnQiCMS, you can use{% languages websites %}The tag traverses all language sites and<head>partially generates<link rel="alternate" href="{{item.Link}}" hreflang="{{item.Language}}">of whichitem.LinkIt is the link of the current language site,item.Languagewhich is the corresponding language code (such aszh-cn,en)