[geeklog-devel] IMPORTANT: More language talk
Jason Whittenburg
me at jasonwhittenburg.com
Fri Jan 24 13:35:18 EST 2003
The easiest way might be to check php_info(); and look at the "Configure
Command" line. Is --with-gettext in there?
Or use "php -i | grep gettext" on the command line
My $0.02
-Jason
Tom Willett said:
> I imagine that most people had no idea what you were talking about when
> you asked for input on whether ISP's had gettext support.
>
> Suggestion -- make a simple script that tests whether or not a server
> has gettext support enabled. Put it up on www.geeklog.net with
> instructions on how to install and run it and ask everyone to run in on
> there server and report back the results with their server and/or isp.
> It would be helpfull to know if all the popular distributions come
> with it enabled by default. My guess here is yes, but you never know.
>
> Tom
>
> On Fri, 24 Jan 2003 11:01:21 -0600 (CST), Tony Bibbs wrote
>> After some critial thinking I don't think we can do both gettext AND
>> our current array-based method of doing translations. Why?
>>
>> Well here is the gettext() process in a nutshell. Let's say you have
>> a bunch of .php pages in some directory. To get a translated string
>> you: 1) get user's locale
>> 2) set locale
>> 3) where you need a translating string put gettext('some english
>> text');
>>
>> Then when you are done with development you do something like:
>>
>> 1) run a commandline gettext function on all PHP pages. This creates
>> a .po file. IN this file you will have entries like:
>> msgid 'some english text'
>> msgstr ''
>>
>> msgid 'some other text'
>> msgstr ''
>>
>> etc
>>
>> 2) distribute .po file to all translators
>> 3) receive translated .po files back
>> 4) convert .po file to .mo file. .mo is teh file that gettext
>> actually used.
>>
>> Now bare with me. Originally I thought I could support both gettext
>> *and* our current method by simply creating a translator class. Use
>> would have been similar to this:
>>
>> $translator = &translationFactory::getTranslatorClass($method);
>> $translator->getText('some english text');
>>
>> NOTE: the translationFactory takes a method (gettext or array) and
>> returns the appropriate translator. Then the method calls are the
>> same for both.
>>
>> Will if you are following this, the problem is when you run the
>> xgettext (the command that takes PHP files and makes the .mo file) it
>> won't generate anything...at least I don't think so...because it will
>> be specifically looking for the gettext() function call.
>>
>> So, in my opinion we need to really decide on a method and stick with
>> it. I haven't heard any screaming or kicking about ISP's inability
>> to handle this so should we go with it or just stick with what we
>> got?
>>
>> For me it's a tough decision, gettext is much more elegant and is
>> probably faster and easier on system resources than loading complete
>> language arrays into memory. However, we do run the risk of
>> alienating the few who's ISP don't support gettext().
>>
>> Honestly, I think I'm OK with using gettext(). That's just point of
>> view now. What are your thoughts?
>>
>> --
>> ------------------------------------------------------------------------|
>> Tony Bibbs | "I guess you have to remember that those who
>> don't
> |
>> tony at tonybibbs.com | hunt or fish often see those of us who do as
>> |
>> | harmlessly strange and sort of amusing. When you
>> | | think about it, that might be a fair
>> assessment." | | --Unknown
>> |
>> ------------------------------------------------------------------------|
>>
>> _______________________________________________
>> geeklog-devel mailing list
>> geeklog-devel at lists.geeklog.net
>> http://lists.geeklog.net/listinfo/geeklog-devel
>
>
>
> --
> Tom Willett
> tomw at pigstye.net
> _______________________________________________
> geeklog-devel mailing list
> geeklog-devel at lists.geeklog.net
> http://lists.geeklog.net/listinfo/geeklog-devel
--
Jason Whittenburg, Sr
Web: http://jasonwhittenburg.com
AIM: jwhitten00
ICQ: 9012034
MSN: jason at whittenburgs.com
More information about the geeklog-devel
mailing list