Re: [Gtk-osx-users] Bundling localisation of GtkOSXApplication

On Jun 4, 2011, at 7:21 AM, Dwayne Bailey wrote:

I've been playing around with the localisations of GtkOSXApplication.  I.e. the .strings files.

The wiki Integration documentation say these should be in $PREFIX/share/strings/$lang.lproj - but that doesn't work.  My experiments show that they only work in Resources/$lang.lproj.  But in reading up on the developer docs Resource/$lang.lproj seems to be the recommended way.

It makes the Resource directory very messy so I'd prefer if they where in $PREFIX/share/strings.   Clearly Apple didn't expect you to translate programs into many languages.

So just wanted to check two things:
  1. Am I right or did I miss something?
  2. How to correct the wiki docs
  3. Is it possible to get these resources moved into share/strings?

Sorry for the confusion. When you build ige-mac-integration, the string files are installed in $PREFIX/share/strings. They have to go somewhere in the $PREFIX tree during the build so that the bundler can find them. As you discovered, when you bundle them they have to go in Resources/$lang.lproj. The application menu is pure Cocoa, so it has to use Apple's I18N scheme. I've clarified the wiki page and added the necessary phrase to the bundling example at the bottom. Thanks for pointing that out.

Apple doesn't care how many languages you translate into, but I doubt that they're worried much about how many lproj directories there are under Resources. (FWIW, I counted 12 $lang.lproj directories in AFAIK, there's no facility to tell CoreFoundation to look elsewhere for the resource, but I'll admit that I didn't look very hard.

The alternative would be to use gettext instead of CoreFoundation for the translation service. That would put the translations in $PREFIX/share/locale with everything else. It would also allow the translations to apply when running the program outside of the bundle, which would be a benefit. 

John Ralls

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]