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

Multi language support (i18n) #358

Open
maggie44 opened this issue Oct 15, 2020 · 1 comment
Open

Multi language support (i18n) #358

maggie44 opened this issue Oct 15, 2020 · 1 comment

Comments

@maggie44
Copy link

With the new react-rendition UI from @sradevski, is it possible to integrate support for adding our own language files? Presumably I am not the only one using Balena in English and non-English speaking contexts.

Would inevitably create some challenges. A drop down menu would be required on the UI, perhaps populated by the contents of a languages folder would probably be more viable than at build time of the UI due to the way we create the container right now. It could draw on the same method as the --custom-ui feature. Probably a new string to launch wifi connect with too, that allows changing the default languages from English (--default-language=fr). Alternatively or additionally, pass a string in a url on accessing the interface (?link=fr) which would provide the added benefit of being able to better integrate in to apps that have already had a user set a language.

I'm sure many other challenges too, but wanted to float the idea.

@maggie44
Copy link
Author

maggie44 commented Dec 3, 2020

A little rudimentary to be sure, but here is my current approach taken to allow custom messages and to allow multiple languages. Shared here for others to use as a interim measure:

https://github.com/LearnersBlock/learners-block/tree/master/controller/wifi-connect-ui/ui

Passing /?language=xx on the end of the URL, where xx is a two digit language code (en, fr, de, ar) will change the main message languages to those set in the JSON files stored in ./ui/src/components/i18n/

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

No branches or pull requests

1 participant