ultragtx
ultragtx

Reputation: 957

How to set supported localization programmatically

When using nib files I can set the supported localizations here:

enter image description here

When this is done and the pop up "Paste" button will be translated into the system language like this:enter image description hereenter image description here

But I'm not using a nib file now, and the translate will not happen, so how can I programmatically set the supported localizations just like what I did to the nib file?

Upvotes: 2

Views: 386

Answers (1)

Rui Peres
Rui Peres

Reputation: 25907

If you are not using a nib file, I am guessing you are creating the UIView's in the code. I would just use the NSLocalizedString(string,comment) function and would assign it's translation on the moment of the UIView's creation.

Upvotes: 1

Related Questions