IOS resolved the issue of pushing local internationalization ES1en ES2en localization failure

  • 2020-06-19 11:45:43
  • OfStack

The body of the

1. Prepare

Push official documents of local internationalization:


{"aps":{"alert":{"title":"Shou","loc-key":"notification_push_live","loc-args":
["over140","broadcast test"]},"badge":0,"sound":"default","content-available": 1}}

NWPusher test Push content:

In en. lproj/Localizable. strings corresponding written (the system default English language) :

"notification_push_live" = ":space_invader: %@ is broadcasting %@";

Problem 2.

Upon receiving the push, body directly displays notification_push_live, indicating that the internationalization failed and no strings were found.

3. The reason why & To solve

Found an empty Base engineering. lproj/Localizable strings, nothing inside, project creation after didn't delete you don't have to.

In addition to the test 1, if it is not supported by the default language will be English

This is the introduction of IOS development internationalization, hope to help the development of IOS friends.


Related articles: