Some issue with ASS localization

Hi m8s,

I plan to localize an ASS app of mine. But as I have never done such a thing before, I’m a little confused.

Setting a localized string in runtime is pretty easy:

set theString to localized string "SOME_KEY" from table  "Localizable"

But what about those strings which you set for the nib - right in Interface Builder?
Do you have to connect a “on awake from nib” action with every single text item to get it localized one the app is launched?
Or is there some easier way to have the app load the right text strings into the NSTextfields etc. on its own?

Thanks in advance,

Hallo Vincent,

when you have finished your nib-file, choose Get Info from the contextual menu and
add a localization in the General Tab. Then you can change all entries in the new nib-file to the localized values
(There is also a way to use one nib-file using Localizable.strings, but I haven’t understood it yet).

Add also a localization in Localizable.strings, for example you have in english

[i]/* Buttons & Menus */
“YES” = “Yes”;
“NO” = “No”;
“CANCEL” = “Cancel”;

/* Dialogs */
“MANUALLY” = “Please choose a text encoding format manually”;

and in german
/* Buttons & Menüs*/
“YES” = “Ja”;
“NO” = “Nein”;
“CANCEL” = “Abbrechen”;

/* Dialogs */
“MANUALLY” = “Bitte wählen Sie eine Textkodierung manuell”;

in the AppleScript code, you have only to write something like this

display dialog (localized string "NO_DETECT") & return & (localized string "MANUALLY") buttons {(localized string "OK")} default button 1 with icon 0

Hi Stefan,

first of all: Thanks for the prompt reply!

What you are explaining looks like “runtime” localizations to me. That’s what I’m already using. (Localizable.strings etc.)

But what I meant was: How do I get my MainMenu items and all those other hardcoded interface elements (which I layout inside IB) to have localized text values? (without having to replace them with their localized equivalents when the app launches)

When I select MainMenu.nib inside Xcode and choose “Make File Localizable” then it creates seperate nib files for every language.
But when I now - say - add a button to the english nib then it doesn’t show up in the german nib as well. “Zettelwirtschaft” at its best, I’d say.

As I mentioned, there is a way to use one nib file using nibtool, it’s described here.
I’m using separate nib files. The disadvantage is, you have to add all new elements in each single file,
the advantage is, you can use different sizes of the elements, which can be useful especially in german.

Ah, okay. Thanks. I’ll give it a try. The app iLocalize aims to be a frontend for nibtool. Checking it out right now.

[Edit:] I’ll stick to the “Localization Suite” from
It’s donationware and has a very neat GUI.