On Nov 20, 2007 9:51 PM, Jean Christophe Andr? <jean-christophe.andre at auf.org> wrote: > Tom Lancaster a ?crit : > > Now I don't particularly care about the nomenclature of my directories, > > except that fr_FR.utf8 is illegal in a mysql column name, and for > > convenience sake I would like to name fields the same as the locale name. > Do you mean you are using a table with multiple columns, one column for > each language? If so, it's not very optimized, because most of the time > you won't use most of the data manipulated, and you'll be limitated in > how many languages you may support by the maximum column count for a table.
I don't anticipate ever reaching that limit. Call me optimistic, but for a web application in SE Asia I don't think I'll ever approach MySQL's column limit. That said, most of my gettext text is inline in the application and behaves well. There are exceptions (in my case, 'types' tables with a small set of values; these are stored in SQL for brevity's sake mostly; the same applies for i18n) > > Why not implement the gettext concept to the end? I mean following the > idea of automatic message extraction, identified then by ? message id ? > and replaced by a gettext dictionnary call using the choosen locale to > lookup in the right table. The gettext tools will help to do this. In > this way you'll have one table per language with only two columns: > `message_id` and `message_string`. You may name these tables using the > language and country part (left part, before the dot, eg: > `messages_fr_FR`) instead of the full locale name > (language_COUNTRY.ENCODING at VARIANT). > Given how little I actually need to do this I think this is overkill. > > Firstly, is it terribly wrong to name my locale directories fr_FR when they > > are in fact utf8? > > > Since the "fr_FR" ? tout-court ? locale name is an alias for > "fr_FR.ISO-8859-1" (see "/usr/share/i18n/SUPPORTED"), yes it is. > > > Secondly, how do I get the fr_FR locale on my Gutsy system? > > > If you mean the UTF-8 encoded variant, you have it already since Ubuntu > is using this encoding everywhere (or at least aims to do so) and so > install it by default. > If this is so, why does this locale not work on my system (original question) :P Or rather, if this is an alias for something which is supported, how come it doesn't work? Thanks, Tom > -- > Jean Christophe "????" ANDR? ? http://asie-pacifique.auf.org/ > Responsable technique r?gional > Agence universitaire de la Francophonie (AuF) ? Bureau Asie-Pacifique (BAP) > Adresse postale : AUF, 21 L? Th?nh T?ng, T.T. Ho?n Ki?m, H? N?i, Vi?t Nam > T?l. : +84 4 9331108 Fax : +84 4 8247383 Mobile : +84 91 3248747 > ? Note personnelle : merci d'?viter de m'envoyer des fichiers PowerPoint ? > ? ou Word, voir http://www.gnu.org/philosophy/no-word-attachments.fr.html ? > > _______________________________________________ > HanoiLUG mailing lists: http://lists.hanoilug.org/mailman/ > HanoiLUG wiki: http://wiki.hanoilug.org/ > HanoiLUG blog: http://blog.hanoilug.org/
