I would like to disable most of the available languages is the user interface language options (Profile → Interface → Interface language) except English (es), Spanish (es), and French (fr).
Is it possible?
The discussion revolves around disabling most user interface language options in Discourse, leaving only English (en), Spanish (es), and French (fr). guictx asks if this is possible, and eatcodetravel explains that it’s not feasible via SiteSettings but has created a plugin to achieve this available-locales-plugin. frictionel notes that while the plugin helps, it doesn’t prevent language files from being built during app rebuilds, which can be time-consuming. eatcodetravel acknowledges the concern and suggests that locale files could be cached to improve build times. codergautam asks whether the plugin would still default users to their browser’s locale, such as Arabic for users from the Middle East.
I would like to disable most of the available languages is the user interface language options (Profile → Interface → Interface language) except English (es), Spanish (es), and French (fr).
Is it possible?
I was looking to do this and is not possible using the SiteSettings. I created a plugin to be able to do it.
That’s a great plug-in but it doesn’t disable the languages at all, right? So we still have to wait ages for all language-files to be build every time we rebuild the app? From my experience this is the most time consuming part (or at least the most useless time spent waiting).
Related topic:
https://meta.discourse.org/t/does-rebuild-time-scale-with-forum-size/66556
I’m not sure if languages impact that much in build time, maybe someone from core can confirm this. If this is the case, then we for sure can do improvements in this area, locale files are kinda static so I think we can easy cache them at build time
此插件是否也会禁用默认选项?例如,如果用户从中东地区连接,并使用阿拉伯语区域设置,它是否会将他们默认设置为阿拉伯语?