[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Gettext .mo portability
From: |
Bruno Haible |
Subject: |
Re: Gettext .mo portability |
Date: |
Tue, 24 Aug 2004 13:19:36 +0200 |
User-agent: |
KMail/1.5 |
Thierry Pierron asked:
> There's a few thing that is not very clear in the documentation of gettext.
> Actually is the .mo files compiled with msgfmt(1) portable across different
> platform ?
Yes, .mo files generated on one platform can be used on all other platforms.
> If I compile my .po files on a x86 Linux box, are they readable for example
> on MacOS X (with compatible version of course) ?
Yes.
> Here's my real problem : should I include pre-compiled version of .po in my
> package or not ?
Yes. This is recommended, so that the user who unpacks your package doesn't
need to have msgfmt(1) installed.
> I hope that's possible, otherwise gettext package would be just a real pain
> for users. Well, I don't want to force user to install gettext whenever
> they want to have my programs translated (especially on MacOS X).
On MacOS X in particular, libintl is not preinstalled, and the gettext()
function is not available in libc either. So your program will have to
depend or include libintl: In packagings like find or darwinports, your
package would depend on the gettext-runtime package. If you ship it
independently, you'll have to ship binaries of gettext-runtime as well,
or link with libintl.a statically. (You can get a libintl.a by
installing gettext-runtime with --enable-static --disable-shared.)
> Another question : how can I know that gettext(3) is using mmap(2) ? And
> how can I disable it ? That feature is a real hassle when developping
> translated program.
I don't understand. gettext(3) uses mmap(2) on all platforms where mmap(2)
works. What is the problem with it?
Bruno