Gettext: Many .po files ?

View: New views
5 Messages — Rating Filter:   Alert me  

Gettext: Many .po files ?

by Samuel ROZE :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

## French version below

Hi,

I'm using Gettext to make my projects/libraries multi-lingual. The
problem is that I user only one .po file per project and some librairies
or used in many projects.

Can I user many .po/.mo files ? For example, lib "lib1" uses Gettext.
This library is used by "project1" and "project2".
-> I have to copy & paste lib1's gettext fields into the both projects
gettext files.

It's the same problem with PEAR libraries. How I can share a library
who's using Gettext ? ...

So, is it possible to use simultaneously many .mo/.po files ? Is it
possible to do includes in .mo/.po files ? Are there alternatives to
have common fields between these projects ?

Another small-question: Is the execution time is even more that the file
size increase ?

Thanks a lot.
Samuel.

## French version here

Bonjour à tous,

J'utilise Gettext comme tout le monde pour faire du multi-langue.
Seulement, j'utilise un fichier ".po" par projet, c'est toujours comme
ça que j'ai appris à faire.

Le problème, c'est que j'ai des librairies communes entre plusieurs
"projets" (mais liés), installés sur le même serveur. Dans ces
librairies j'utilise gettext.

Quand j'appelles (require) la librairie à partir du projet1, ça utilise
le fichier .po de ce projet, et que j'appelles depuis le projet2 ça
utilise son .po. J'ai donc des redondances dans les fichiers...

C'est la même problématique pour distibuer des version multilingues de
librairies sur PEAR...

Est-ce possible d'utiliser plusieurs fichiers .po simultanéments ?
Est-ce possible de faire des includes dans les fichier .mo ? Il y a-t-il
d'autres solutions que de faire un fichier gettext commun entre ces
projets pour éviter les redondances ?

Autre petite question annexe, plus le fichier est gros, plus c'est long
à charger, même compiler ? Avez-vous des ordres de grandeurs du genre
100Ko = 50% de temps de moins à charger que 1Mo par exemple... ?

Merci.
Cordialement, Samuel.


--
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: Gettext: Many .po files ?

by Markus Tacker-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Samuel,

2009/8/16 Samuel ROZE <samuel.roze@...>:
> Can I user many .po/.mo files ? For example, lib "lib1" uses Gettext.
> This library is used by "project1" and "project2".

Yes, of course.
See http://de.php.net/dgettext for reference, especially the example
at the end of the page.

--
  mit freundlichen Grüßen
  Markus Tacker

  kontaktdaten ~ http://m.tacker.org/kontakt

  coder::by(♥);

--
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: Gettext: Many .po files ?

by Samuel ROZE :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Oh thanks ! It's so great ! :)

Thank you very much ! ;-)

Le lundi 17 août 2009 à 08:43 +0200, Markus Tacker a écrit :

> Samuel,
>
> 2009/8/16 Samuel ROZE <samuel.roze@...>:
> > Can I user many .po/.mo files ? For example, lib "lib1" uses Gettext.
> > This library is used by "project1" and "project2".
>
> Yes, of course.
> See http://de.php.net/dgettext for reference, especially the example
> at the end of the page.
>
> --
>   mit freundlichen Grüßen
>   Markus Tacker
>
>   kontaktdaten ~ http://m.tacker.org/kontakt
>
>   coder::by(♥);
>


--
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: Gettext: Many .po files ?

by Igor Feghali-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> Another small-question: Is the execution time is even more that the file
> size increase ?

can you rephrase please ?

--
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: Gettext: Many .po files ?

by Samuel ROZE :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Le mercredi 14 octobre 2009 à 22:13 -0300, Igor Feghali a écrit :
> > Another small-question: Is the execution time is even more that the file
> > size increase ?
>
> can you rephrase please ?

If the .so file size increase, is the execution time increase ?


--
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php