I18n - App with multiple language support

I would like to add multi-language support to my application. For e.g. I will have a language drop-down at the top of the app and when user changes the option to Japanese, all the texts, button texts should be in Japanese.

While I can store the translations in a collection and also have user preferred language recorded, filtered on the translations collection, is there a way to bulk fetch and show the translated text on a screen?

The way we can think of is to make the text a list and retrieve only the translated text to display it. So, if there are 10 components with texts, we will have 10 queries to the DB. Clearly, this is not a great approach. If there is a better way, please suggest.

Or you can have just 1 record collection with lots of fields, if all your screens need 100 translation, then 100 fields they are.

Hi @Kaigal :wave:

@Davidaa_WoW has created a component. Try with that . This might be helpful.

(I didn’t use this component still.)

Or duplicate the screens and change the language of the texts and link to that screens based on Logged is user selected language.

This is the two options that I thought.

Thank you

1 Like

Thank you @dilon_perera for your reply. This is useful information.

I was looking for a solution that will support up to 10 languages and is also be easier to maintain. I am sure duplicating screens for each language will be a good way if we can name screens in a particular format and link them based on user preference, This route is a tough one on maintenance as screen changes in 1 language will mean changing in 10 screens.

1 Like

Thanks for your response.

Your welcome :+1:

Hmm. You can add a screen as a home screen(screen navigation type) like text with a Hello and then add a countdown component and set several actions link to the first screen of English if the Logged in user > Language is equal> to English. And for the other language screens also like this. And edit the screens based on that languages.

Then when the user opens the app that added screen is appearing and linking to the screen based on that user’s language.

Thank you

Hi, one my app has English and Italian language… I’ve cloned each screen for the traduction, when an user signup, he selects his language (text field on user), then i set a Splashscreen with 2 different lotties animations (or countdown is the same). One is only visible if logged in user- language - equal to English, viceversa set visible the other one if the user language is Italian. Once the animation ends, it brings the user on the right language home page. I tried different approaches for multi language but seems like cloning screens is painful but works great

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.