[AC-3230] Localizing Push Notification Alerts
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | n/a |
Status | Resolved |
Resolution | Duplicate |
Resolution Date | 2015-09-17T06:39:42.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | TCSupportTriage, android, ios |
Reporter | Joseph Sachs |
Assignee | Shak Hossain |
Created | 2014-10-01T14:33:56.000+0000 |
Updated | 2017-09-12T09:25:28.000+0000 |
Description
Is there a way to localize Alerts push notifications. Someone suggested we keep the language of the User in ACS.User custom_fields, and then fetch the Users prefered language and send the Push Notification Alert text depending on that users language.
While the above seems like a *very bad practice* (as it requires a lot of ACS calls just to send an Alert), I am wondering if there is a good practice to localize the Alert text in Push Notifications.
*Apple Suggests* using:
"alert" : {
"loc-key" : "My Localized String",
...
}
And then, in your Localizable.strings file inside the correspondent language identifier, add the following:
"My Localized String" = "The localized string in the language you want.";
Ideally the same method would be used for Android.
When sending a Push via ACS:
and in /i18n/en/strings.xml:
and in /i18n/fr/strings.xml:
Does not work, I see the Alert on the device as: {"loc-key":"addbarcode"}
Also with iOS8, you can localize also the Action button label with: “action-loc-key” : “buttonTitle”
Wondering how come this isn't a high priority...
According to https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/ApplePushService.html#//apple_ref/doc/uid/TP40008194-CH100-SW21 the key should come from LANG.lproj/Localizable.strings which is what our i18n/LANG/strings.xml writes to, so it's weird that this is not working.
I see, so I'm guessing this ticket is still valid. Thanks @Fokke
[~underlabs], I moved this to TIMOB-19459 as a feature request.
I see this as Resolved :) I wonder if the change happened on the Cloud + Ti SDK, or just Ti SDK... basically wondering if I can take advantage of the solution now, if not... an approx. time frame to be released to the public. Thanks guys!
Hello This was moved to an internal project. Van you see the attached CLOUDSRV project?
Any news about this ticket? It seems not yet available on arrowdb .