Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
216 views
in Technique[技术] by (71.8m points)

android - Firebase and localization

I'm working in app that support Arabic and English language using firebase database my question is there is any way I can localize data that come from firebase in my my app

question from:https://stackoverflow.com/questions/65861775/firebase-and-localization

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
  • Is there is any way I can localize data that come from firebase in my app?

There are many ways in which you can locate a user, but this requires enabling the device's location, asking for permissions, and so on. This option might not be the best one, because I, as a traveler, if I visit your country and download your app, I'll get Arabic content and I won't be happy with that, because I don't know Arabic. The best option that you have is to display the content according to the language the user has already set on the device. So it doesn't matter where the user is localized, the user will always see the content in the language he likes. For example, if a user from your country will travel to the United States, he will still see the content of your app in Arabic, which makes sense, because it's possible that the user might not know English.

Another option might be to let the user choose the language even from the beginning when first time opens the app. That way, you'll always be sure about the preferred language. However, don't forget to add the option to update this preference later, if needed.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...