htdocs and gettext

Neil Williams linux at codehelp.co.uk
Mon Jan 23 13:38:20 EST 2006


On Monday 23 January 2006 5:45 pm, Neil Williams wrote:
> On Monday 23 January 2006 5:04 pm, Josh Sled wrote:
> > On Mon, 2006-01-23 at 16:33 +0000, Neil Williams wrote:
> > > OK. I've got gettext working with PHP to translate a single website
> > > using as many PO files as we can create.
> >
> > Awesome.
> >
> :-)  It's not ready to commit as a demo yet, but it does work locally.

n.b. there are now two externals directories - one that is being read by 
mail-search but which is redundant and one that is under the new www/ which 
can be compressed to remove the en/ subdirectory.

Sorting out that is the next stage. (tips welcome!)

The rest of the plan is now:

1. Convert all remaining .phtml files to identify translatable strings.
     a) Each translatable string needs to be on a single line - PHP doesn't 
have the concatenation behaviour of C where "x " "y" are added before being 
passed to gettext. If in doubt, see www/index.phtml.
     b) Wherever possible, keep paragraphs together but avoid including too 
many HTML tags in the translatable string, especially <a href=""> as the 
quotes need to be escaped and may not survive translation.
     c) I've committed a few helper files which may be removed eventually.

2. News items will be put for translation by the news-script so don't do 
anything with those.

3. Other languages are not automatically supported yet - particularly at my 
demo site.

4. Only the index page is actually by the server at the moment, I need to 
extend support by using a slightly modified gettext.php in each file.

If anyone feels like helping with the identification of translatable strings, 
feel free to commit.
:-)

Translators should wait a little longer until more of the content is marked up 
for gettext. However, if you want to make a start, please do.

-- 

Neil Williams
=============
http://www.data-freedom.org/
http://www.nosoftwarepatents.com/
http://www.linux.codehelp.co.uk/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20060123/85eab2d4/attachment.bin


More information about the gnucash-devel mailing list