Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use different configs for different languages? #852

Closed
3 tasks done
njzjz opened this issue Apr 25, 2019 · 5 comments
Closed
3 tasks done

How to use different configs for different languages? #852

njzjz opened this issue Apr 25, 2019 · 5 comments

Comments

@njzjz
Copy link

njzjz commented Apr 25, 2019

I agree and want to create new issue


How to use different configs for different languages? I want to link the sidebars to different pages for different languages.

@welcome
Copy link

welcome bot commented Apr 25, 2019

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

@ivan-nginx
Copy link
Member

ivan-nginx commented Apr 25, 2019

Feature is not documented yet because in beta testing, but u can try to followed by this feature: https://github.com/theme-next/theme-next.org/blob/source/source/_data/languages.yml

GitHub
The website for NexT theme. Contribute to theme-next/theme-next.org development by creating an account on GitHub.

For full multi-language support, please, wait.

@jiangtj
Copy link
Member

jiangtj commented Jul 14, 2019

@ivan-nginx That doesn't seem to be what he's talking about.
Like the example below, the address of the menu bar jumps to a different address.
en

menu:
  home: / || home
  tags: /tags/ || tags
  categories: /categories/ || th
  archives: /archives/ || archive

zh

menu:
  主页: /zh/ || home
  标签: /zh/tags/ || tags
  类别: /zh/categories/ || th
  归档: /zh/archives/ || archive

@stevenjoezhang
Copy link
Contributor

stevenjoezhang commented Jul 26, 2019

And blogs can be generated in different directories in different languages

See also iissnan/hexo-theme-next#1680

@stevenjoezhang
Copy link
Contributor

stevenjoezhang commented Feb 29, 2020

After investigation, I think this should be a feature of Hexo. Please ask Hexo for help: http://github.com/hexojs/hexo/issues

I suggest you write your own script, modify configuration (e.g. url and root in _config.yml) and source files, then execute hexo generate multiple times.

See also
https://hexo.io/zh-cn/docs/internationalization
hexojs/hexo#1696

What theme NexT can do is adding a multi-language switch button
#1070

Hexo
若要让您的网站以不同语言呈现,您可使用国际化(internationalization)功能。请先在 _config.yml 中调整 language 设定,这代表的是预设语言,您也可设定多个语言来调整预设语言的顺位。 language: zh-twlanguage: - zh-tw- en 语言文件语言文件可以使用 YAML 或 JSON 编写,并放在主题文件夹中的 languages 文件夹

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants