Open srini2dl opened 4 years ago
Thanks for the feature request, @srini2dl. We will add this to the roadmap.
Just realized that this for the Cloud Messaging SDK. Assigning to the current support on-call.
@srini2dl we do use a list of language codes that is matching UI. https://github.com/firebase/firebase-ios-sdk/blob/793d7634906229f7ca58c571e3ebbc6caa5b79e0/FirebaseMessaging/Sources/FIRMessaging.m#L1027
is there a case that it doesn't fit your use case?
@chliangGoogle I was searching for a way to change the currentLocale
that is set during function FIRMessagingSDKCurrentLocale
https://github.com/firebase/firebase-ios-sdk/blob/793d7634906229f7ca58c571e3ebbc6caa5b79e0/FirebaseMessaging/Sources/FIRMessaging.m#L872
my case is I m using NSLocalizedString to localize my app but and in https://github.com/firebase/firebase-ios-sdk/blob/793d7634906229f7ca58c571e3ebbc6caa5b79e0/FirebaseMessaging/Sources/FIRMessaging.m#L1008
the function returns the locale based on the device NSLocale preferredLanguages
-> this list does not indicate what language the app is actually running in and the currentLocale
is set to the iPhone Language that is set on Setting Language & Region
I see so you are saying your app is using a language that might not be the same as the system one on the device? So I guess it's a feature where like auth that allows developers to set an arbitrary language. Is my understanding of your case correct?
@chliangGoogle yes that's correct.
Thanks for our feedback, we will add this to our roadmap.
Hi - it's been about two years since an update - several of us developers are hoping this gets done as it will ease locale testing.
Feature proposal
In FIRMessaging.M the current locale takes the value from
[NSLocale preferredLanguages]
which doesn't return what the actual language is used in the app's UIIt would be great if there is a way, where we can set the languageCode like we have in FirebaseAuth
Auth.auth().languageCode = "fr"