iPhone – Dynamically change the language when running iOS

I have been stacking and Google search for hours. I am a little desperate now.
I want to change the language of the application in the application, not just use the default language .

From my attempts, I restarted like everyone else. This means that Apple forces you to restart the application manually. This means you have to quit the application and then start it again.

Well, after Googling, I tried to set an alert and then force the application to exit

exit(0);

My bad, Apple doesn’t seem to like this and prevents developers from using it…I don’t think I am pointing in the right direction.

Finally, despite all the questions, I can still meet, I want to discuss .

Any tips?

Edit, APPLE related information

In general, you should not change the
iOS system language (via use of the< br> AppleLanguages ​​pref key) from within
your application. This goes against
the basic iOS user model for switching
languages ​​in the Settings app, and
also uses a preference key that is not
documented, meaning that at some point
in the future, the key name could
change, which would break your
application.

If you want to switch languages ​​in
your application, you can do so via
manually loading resource files in
your bundle. You can use
NSBundle:pathForResource:ofType:inDirectory:forLocalization:
for this purpose, but keep in mind< br> that your application would be
responsible for all loading of
localized data.

Regarding the exit(0) question, Apple
DTS cannot comment on the app approval
process. You should contact
[email protected] to get an answer
for this quest ion.

Well, so far I have to choose.

This is a fairly old question, but I was just trying to solve the same problem and found this solution:

http://aggressive-mediocrity.blogspot.com/ 2010/03/custom-localization-system-for-your.html

This is exactly what you need (may be helpful for people with the same problem:)

I have been stacking and Googling for several hours. I am a little desperate now.
I want to change the language of the application in the application, not just use the default language.

From my attempts, I restarted like everyone else. This means that Apple forces you to restart the application manually. This means you have to quit the application and then start it again.

Well, after Googling, I tried to set an alert and then force the application to exit

exit(0);

My Bad, Apple doesn’t seem to like this and prevents developers from using it…I don’t think I am pointing in the right direction.

Finally, despite all the questions, I can still meet and I want to discuss it.

p>

Any tips?

Edit, APPLE related information

In general, you should not change the
iOS system language (via use of the< br> AppleLanguages ​​pref key) from within
your application. This goes against
the basic iOS user model for switching
languages ​​in the Settings app, and
also uses a preference key that is not
documented, meaning that at some point
in the future, the key name could
change, which would break your
application.

If you want to switch languages ​​in
your application, you can do so via
manually loading resource files in
your bundle. You can use
NSBundle:pathForResource:ofType:inDirectory:forLocalization:
for this purpose, but keep in mind< br> that your application would be
responsible for all loading of
localized data.

Regarding the exit(0) question, Apple
DTS cannot comment on the app approval
process. You should contact
[email protected] to get an answer
for this question.

Well, so far I have to choose.

This is a fairly old question, but I’m just trying Solved the same problem and found this solution:

http://aggressive-mediocrity.blogspot.com/2010/03/custom-localization-system-for-your.html< /p>

This is exactly what you need (may be helpful for people with the same problem:)

Leave a Comment

Your email address will not be published.