[html-formfu] Unicode - I18N - FormFu - YAML

Andreas Marienborg omega at palle.net
Mon Apr 7 15:17:49 BST 2008


On Apr 7, 2008, at 3:59 PM, Immofrance - Green-Acres wrote:

>
> Hi,
>
> Looking at the =91unicode=92 examples, I made it work correctly, but  =

> still have a few questions:
>
> -          My database is fully in UTF-8. The Unicode tutorial  =

> requires to declare each database column as utf8. Isn=92t there  =

> something shorter / autogenerated ? Manually handling this is hard  =

> to maintain

You might have more luck figuring this out by askin on the DBIC-list  =

for instance. I usually only add TEXT columns to utf8_columns


> -          YAML is great, but is it really something useable to  =

> build a multi-languages web site ? Forms label and legend needs to  =

> be I18N in each language. Is there a way to extract those and apply  =

> translations at runtime then ? I have seen this exists for PHP  =

> Symfony. Does it exist for Perl YAML or should I use  =

> Catalyst::Config instead of YAML files?
>

use label_loc, value_loc etc

Then apply the patch from URL to your locale::maketext::extract, and  =

create an update_po.sh or whatever:

#!/bin/sh

find lib root script -type f -not -path '*.svn*' \( -name '*.pm' -or - =

name '*.tt' -or -name '*.js' -or -name '*.yml' \) > filelist.tmp

for i in 'en' 'no' 'hu'; do
     echo "lang: $i"
     xgettext.pl --files-from=3Dfilelist.tmp -o lib/Startsiden/Bookmarks/ =

I18N/$i.po
done;

rm filelist.tmp


and viola, it extracts the _loc stuff from the yml, puts it in your  =

I18N files, and you can translate it the together with the rest of you  =

catalyst stuff

- andreas

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/html-formfu/attachments/20080407/12=
111b59/attachment.htm


More information about the HTML-FormFu mailing list