可用语言插件

Repo: Majal / discourse-available-locales · GitLab

This plugin allows you to limit the locales shown in the Interface language dropdown in the User settings.

image

Admin settings

  • available interface locales: List of locales that will be available for users to select.

Notes

  • This plugin will be enabled once you enable the allow user locale setting.

image

  • By default, all languages available in Discourse today (2018-04-27) are enabled.
9 个赞

Just tried this (2018-4-29) Work for me!

Thanks for building this!
(I am just trying different plugin to get familiar with Discourse plugin ecosystem.)

0. Install

cd discourse/plugin
git clone https://gitlab.com/majalorg/discourse-available-locales

restart rails s

1. Set available language (as admin) (Chrome)

2. Use another browser to login as normal user (Firefox)

Thanks!

1 个赞

@angus 开发了一个包含此功能的插件。在安装此插件之前,建议您先查看一下:Multilingual Plugin 🌐

1 个赞

这里的区别在于该功能显示在用户设置中。我喜欢这一点。

多语言插件还允许您限制用户界面语言设置中可用的语言区域。

详见:Pavilion

4 个赞

这样设置后是否可行:(例如,中国匿名用户将没有区域设置?)

我不这么认为,我在开发时该功能尚未可用,也许 @angus 插件支持此功能。

2 个赞