I think I've gotten this to work using declares before. Here are a
few guesses. First, the localization stuff is case-sensitive. Make
sure that the folder is named "French.lproj" and the file therein is
named "Localizable.strings".
Next, add a CFBundleIdentifier key-value pair to your application's
Info.plist file (look at some other application for an example). Mac
OS seems to use this a lot for various OS-related things.
If that doesn't do the trick, try adding the folllowing to your
Info.plist file.
<key>CFBundleLocalizations</key>
<array>
<string>en</string>
<string>da</string>
<string>de</string>
<string>es</string>
<string>fi</string>
<string>fr</string>
<string>it</string>
<string>ja</string>
<string>ko</string>
<string>nl</string>
<string>no</string>
<string>pt</string>
<string>sv</string>
<string>zh_CN</string>
<string>zh_TW</string>
</array>
Usually you add this for applications in which you provide your own
localization support.
If neither of these works, I suggest just declaring the function and
getting it to work.
Charles Yeomans
On Jul 3, 2006, at 1:58 PM, Arnaud Nicolet wrote:
I was not aware that the encoding could be an issue, thanks for the
info.
But I tried with UTF16 and it still does not work.
Thanks
Le 3 juil. 06 à 16:56 Soir, Charles Yeomans a écrit:
On Jul 3, 2006, at 10:21 AM, Arnaud Nicolet wrote:
Hi,
In a blank project, I've put this code in the Window's mouseDown
event:
dim s as string
s=app.BundleLocalizedStringMBS("Test","")
if s="Test" then
msgbox "For developer: the key ""Test"" was not localized for
any language."
end if
MsgBox s
I've compiled the app (as a PEF app, since my final app can't run
as Mach-O) and then I've bundled it (using App Bundler).
In "MyApplication.app/Contents/Resources/", I've added
"French.lproj".
I've placed a file ("/resources/french.lproj/
Localizable.strings") which only contains:
"Test"="C'est un test";
(saved as a plain text file).
When I try my app, I only get a blank string (not even the "The
key "Test" was not localized for any language." message).
What else is required for the localization process?
Are your .strings files encoded using UTF-16? Apple docs say that
UTF-8 may not work.
Charles Yeomans
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>