hexo-theme-next icon indicating copy to clipboard operation
hexo-theme-next copied to clipboard

Can we use a language.yml file in Hexo's source folder for custom translation

Open Aermisty opened this issue 7 years ago • 6 comments

I agree and want to create new issue


Expected behavior

Use a language.yml file (such as zh-CN.yml) in site directory /source/_data/ folder for custom translation, just like the existing custom files in site directory source/_data for custom styles and layout. Then we do not need to edit the language files in theme directory /themes/next/language/ for custom translation any more (keep theme folder unchanged).

Actual behavior

Edit the language files in theme directory /themes/next/language/ for custom translation.

Steps to reproduce the behavior

  1. N/A
  2. N/A
  3. N/A
  • Link to demo site with this feature: N/A
  • Link(s) to source code or any usefull link(s): N/A

NexT Scheme:

  • [x] All schemes
  • [ ] Muse
  • [ ] Mist
  • [ ] Pisces
  • [ ] Gemini

Aermisty avatar Jul 14 '19 08:07 Aermisty

Thanks for opening this issue, maintainers will get back to you as soon as possible!

welcome[bot] avatar Jul 14 '19 08:07 welcome[bot]

Solved with the file languages.yml in jiangtj/blog

Aermisty avatar Jul 14 '19 09:07 Aermisty

Solved with the script in jiangtj/blog

??? This is part of NexT's ability to merge external i18n files, I don't seem to have any modifications.

jiangtj avatar Jul 14 '19 10:07 jiangtj

Solved with the script in jiangtj/blog

??? This is part of NexT's ability to merge external i18n files, I don't seem to have any modifications.

LOL, but it really works for me! 😂😂

Using this file

Aermisty avatar Jul 14 '19 10:07 Aermisty

See also https://github.com/hexojs/hexo/issues/3595

stevenjoezhang avatar Aug 30 '19 05:08 stevenjoezhang

😂 NexT has this feature, but it doesn't seem to be written in the documentation.

jiangtj avatar Aug 30 '19 06:08 jiangtj