how does hexo-i18n detect the correct language?
zekeair opened this issue · comments
Zeke Zhou commented
After hexo generate
operation, all __()
and _p()
have been exchanged to text. What is the foundation when hexo-i18n
working? Although the _config.yml
has multiple language order list, all __()
and _p()
are always converted to the language according to the first item of multiple language order list.
Mimi commented
hexo-i18n loads all the language files according to the language setting in _config.yml
. During hexo generate
it replace all __()
and _p()
to the first available translation in the language list. For example, the user specify two languages in _config.yml
:
language:
- zh-CN
- en
If the translation of some string in zh-CN
is not available, then it will fallback to use the string in en