Internationalization Support
Info
This documentation is AI-generated. You can help improve it by submitting an Issue.
提示
If the issue remains unresolved, visit GitHub Issues to search or submit new feedback, or join QQ group 694413711 for community support.
Contributions to this tutorial are always welcome.
How to Correctly Set HTML Page Language
Setting priority: Please refer to Page Language Setting Priority.
- Correctly set the Default Page Language in theme settings
- For posts, categories, tags, and pages that differ from the default page language, go to the corresponding settings and correctly set their metadata.
How to Modify Fixed Text/Language Files
Go to the Halo CMS deployment directory and find the themes/howiehz-higan/i18n folder. Inside, find the properties file for the corresponding language, modify and save it (for example, Chinese is zh.properties).
Browser Language-Based Auto Redirect Guide
This theme has comprehensive support for language-based auto redirect. You can enable Browser Language-Based Auto Redirect.
提示
Press F12 (or Fn+F12) to open the developer console, select the console tab. Enter navigator.language and press Enter to view your browser's navigator.language value.
After enabling this option, Allowed Target Locale Language Code List should be set in the following format.
Note: Matching order is from top to bottom.
zh_CNen_US
After enabling Multilingual Function Prefix Match Mode, menu names that match the prefix of the navigator.language value will be displayed without requiring an exact match.
Example: zh below can match zh_CN and zh_TW.
zhen
Multilingual Menu Usage Guide
This theme has comprehensive multilingual menu support. You can enable Multilingual Menu Support.
提示
Press F12 (or Fn+F12) to open the developer console, select the console tab. Enter navigator.language and press Enter to view your browser's navigator.language value.
After enabling this option, the main menu should be set in the following format. (Note: The zh_CN item can be a custom link with URL / and name zh_CN. The name is the key setting; other settings don't affect matching)
zh_CN- 首页
- 关于
en_US- Home
- About
After enabling Multilingual Function Prefix Match Mode, menu names that match the prefix of the navigator.language value will be displayed without requiring an exact match.
Example: zh below can match zh_CN and zh_TW.
zh- 首页
- 关于
en- Home
- About
The menu with a name that exactly matches the Default Page Language setting value will be used as the default menu, which will be displayed when no successful match is found.
Multilingual Footer Content Usage Guide
提示
Press F12 (or Fn+F12) to open the developer console, select the console tab. Enter navigator.language and press Enter to view your browser's navigator.language value
After enabling Multilingual Footer Content Support, Custom Multilingual Footer Content should be set in the following format.
Language Code:zh_CNFooter Content:你好!
Language Code:en_USFooter Content:Hello!
After enabling Multilingual Function Prefix Match Mode, menu names that match the prefix of the navigator.language value will be displayed without requiring an exact match.
Example: zh below can match zh_CN and zh_TW.
The above configuration can be changed to:
Language Code:zhFooter Content:你好!
Language Code:enFooter Content:Hello!
The footer content with a language code that exactly matches the Default Page Language setting value will be used as the default footer content, which will be displayed when no successful match is found.
Multilingual Bio/Announcement Usage Guide
提示
Press F12 (or Fn+F12) to open the developer console, select the console tab. Enter navigator.language and press Enter to view your browser's navigator.language value.
After enabling Multilingual Bio/Announcement Support, Custom Multilingual Announcement Content should be set in the following format.
Language Code:zh_CNBio/Announcement Content:你好!
Language Code:en_USBio/Announcement Content:Hello!
After enabling Multilingual Function Prefix Match Mode, menu names that match the prefix of the navigator.language value will be displayed without requiring an exact match.
Example: zh below can match zh_CN and zh_TW.
The above configuration can be changed to:
Language Code:zhBio/Announcement Content:你好!
Language Code:enBio/Announcement Content:Hello!
The announcement content with a language code that exactly matches the Default Page Language setting value will be used as the default announcement content, which will be displayed when no successful match is found.