Hi,
I'm running into a problem localizing our application.
The way it should work:
Copy the en.lproj folder to nl.lproj, adjust the texts, and you should
have a dutch version.
This works in sample applications (so I guess it's not really a
problem caused by monobjc)
However, in my application, it does not.
I have the folowing folders with nibs: en.lproj, nl.lproj, fr.lproj
All of these have working nib files.
If I change my preferred OS language to Dutch, I expect to see the
nibs from nl.lproj. I see the English ones.
When removing en.lproj, I get no more UI, no menu, ...
All MonobjC shows me is the following error: (upping the
MONOBJC_DEBUG level doesn't show more)
633946702097321770 [ERROR] NSApplication - Error while loading the NIB
file
It seems as if it simply can't find the nl.lproj folder, even though
it is there.
In Finder: app ==> get Info ==> Languages, I can see the 3 languages.
In order to find more info, I tried to loop through the
NSBundle.MainBundle.Localizations property.
According to the documentation (both MonobjC and Cocoa), this should
return an NSArray, with NSStrings of the languages available in the
bundle.
However, this property does return an NSArray, which contains 3
elements (I'm assuming this is nl, fr and en), but the elements are
not NSStrings (I'm getting Id's, casting to NSStrings throws
exceptions).
Why aren't these NSStrings?
I'm loading my nib with the line:
NSApplication.LoadNib("MainMenu");
According to the MonObjC code, this is just a shortcut to
NSBundle.LoadNibNamedOwner("Mainmenu", NSApplication.SharedApplication).
According to the MonObjC Documentation of NSBundle.LoadNibNamedOwner,
the path where Cocoa looks for the Nibs is determined by the owner. In
this case, taht would be NSApplication.SharedApplication.
Is there any way I can see more information, like the exact paths it
is looking for?
I'm hoping someone here can point me in the right direction, or show
me a way to get more logging.
Thanks in advance,
- Kenny