Feature: Internationalization (i18n)–compatible multilingual support #711
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Type of change
Checklist
Related Issue
Multiple languages support #224
Changes
This PR focuses on standardizing language codes to follow the BCP 47 standard (e.g., changing
zh_CNtozh-CN) and resolving architectural issues.While I understand that this i18n feature might not align with the project's current roadmap or design philosophy, there is significant community interest in multi-language support. I am submitting this Pull Request to share this implementation with those who need it and to provide a reference for the community..
Multilingual SEO & Search Optimization
Priority and Classification Rules:
The lang: field in the frontmatter takes the highest priority.
If lang: is not specified, the language is classified based on the folder structure.
File and folder names must match across different language directories.
Content Display Logic:
If content exists in the selected language, it is displayed first.
If the selected language is unavailable, the system looks for the default (root) content.
If no root file is found, content is selected based on the predefined language priority order.
Important: Language Key Migration
The language key naming convention has been updated to align with ISO 639-1 and BCP 47 standards:
Screenshots (if applicable)
Additional Notes
zh->zh-CN) aligns the content structure with the new locale codes.