in reply to RFC: improvising multi language HTML
Why not regular dictionary like gettext?
ppixregexplain.plPickTheLanguage( $cgi ); ... <title>@{[ text('title') ]}</title> ... <h1>@{[ text('The Choosening') ]}</h1> sub PickTheLanguage { ... warn ... our $LANG = 'fr'; # from $query ## ensure loaded %dictionary = ( fr => { title => "French", "The C +hoosening" => "Le choisirning" } ); } sub text { $dictionary{$LANG}{"@_"} || "@_"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: RFC: improvising multi language HTML (gettext)
by LanX (Saint) on Aug 12, 2015 at 11:12 UTC |