Skip to content
This repository has been archived by the owner on Aug 20, 2022. It is now read-only.

[Enhancement] Add a language module #1

Open
LuaFan2 opened this issue Aug 16, 2020 · 1 comment · May be fixed by #2
Open

[Enhancement] Add a language module #1

LuaFan2 opened this issue Aug 16, 2020 · 1 comment · May be fixed by #2
Labels
enhancement New feature or request

Comments

@LuaFan2
Copy link

LuaFan2 commented Aug 16, 2020

It would be nice (because changing library core files isn't nice) to make a language module to get phrases accorded to specified language from config. Because English language of course is world-wide, but some owners may prefer that players receive information exclusively in their own language. I can translate the phrases into Russian because I have the necessary knowledge.
Also if you approve the idea, then soon I can close the issue

@LuaFan2 LuaFan2 changed the title Add a language module [Enhancement] Add a language module Aug 16, 2020
@benank
Copy link
Member

benank commented Aug 16, 2020

That's a great idea, though it presents an interesting implementation problem. It could be a completely separate module, but then you run the risk of NAPI being modified and the language module not having associated strings in certain languages. It would also be a challenge to edit all of the existing NAPI messages from outside of the module.

I think it'd be best to include a shared localization core inside NAPI and then possibly add other languages in that same directory/subdirectory. And then if you want to make a module that supports multiple languages, you can use the localization API that was added to NAPI, but specify all of the strings within your module. Kinda throwing ideas here since we don't have experience in this area.

@benank benank added the enhancement New feature or request label Aug 16, 2020
@LuaFan2 LuaFan2 linked a pull request Aug 16, 2020 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants