Re: Is there a "select langauge" module?

From: Gunnar Strand (Gunnar.News_at_gustra.org)
Date: 01/25/04


Date: Sun, 25 Jan 2004 22:57:53 +0100

The Locale::Maketext::TJP13 is an excellent article discussing
the problems with translations and describes the reason behind
the Locale::Maketext module:

http://search.cpan.org/~sburke/Locale-Maketext-1.08/lib/Locale/Maketext/TPJ13.pod

The parameterizaion of messages is the central issue in the
article. I wouldn't mind seeing a reference to it in the
perlfaq somewhere. Recommended reading!

Kind Regards,

/Gunnar

pkent wrote:
> In article <Pine.LNX.4.53.0401241756310.20482@ppepc56.ph.gla.ac.uk>,
> "Alan J. Flavell" <flavell@ph.gla.ac.uk> wrote:
>
>
>>Years ago, IBM internationalised their VM messages by providing
>>for each language a file of message texts, with the parameters
>>designated by placeholders $1, $2, $3 etc.
>>
>>The message-writing routines were called with a message code and a
>>list of parameter values. It's a key feature that the parameters did
>>not have to be placed in numerical sequence - some languages wanted
>>the parameters in one order, others in another, for best idiom. So
>>you might have something like (pure invention)
>>
>>IBMABC123E Command $1 got Error $3 opening file $2
>
>
> Yep this is, in my limited experience, the way that part of the
> localization of internationalized application is done, and eminently
> sensible it is, too. MacOS programs also often have string resources
> (shown up with ResEdit) that look like "Cannot open file ^1 because: ^2"
>
> Other things you also want to change when creating the message are
> number format, date format, time corrections, gender, pluralization,
> screen space allocated for strings, text directionality, keyboard
> shotcut keys... quite a lot really. Some of this sort of thing is done
> in:
>
> http://java.sun.com/j2se/1.3/docs/api/java/text/MessageFormat.html
> and others in
> http://java.sun.com/j2se/1.3/docs/api/java/util/ResourceBundle.html
>
> but I can't immediately find a perl module which offers similar
> functions. The MessageFormat class is like a very souped-up sprintf()
> with all the bells and whistles, and you could use the ResourceBundle
> class to load the correct format strings etc. for the current locale or
> user prefs.
>
> I was reading somewhere else that a program was localized into German
> but that the error messages took up about 50% (they said) more space.
> Naturally the GUI elements weren't resized to take account of this :-)
>
> P
>



Relevant Pages

  • Re: Is there a "select langauge" module?
    ... > for each language a file of message texts, ... number format, date format, time corrections, gender, pluralization, ... screen space allocated for strings, text directionality, keyboard ... The MessageFormat class is like a very souped-up sprintf ...
    (comp.lang.perl.misc)
  • Re: Convert MDB to ADP
    ... What I would suggest, then, is to use a dynamic record source for your form. ... > strings rptCtry() ... Is it possibel to find any function in SQL server to replace Format, ...
    (microsoft.public.access.adp.sqlserver)
  • Re: Missing rows in stored procedure results
    ... First, when specifying dates as strings, either use one of the two safe ... format is not in the documentation on CONVERT, ... WHERE dtTran BETWEEN @dtWeekStart AND @dtWeekEnd ... AND dtImport < @dtImportEnd ...
    (microsoft.public.sqlserver.programming)
  • Re: Convert MDB to ADP
    ... > What I would suggest, then, is to use a dynamic record source for your ... >> generate excel reports. ... >> strings rptCtry() ... >>> There's nothing in SQL Server that directly replace the Format() ...
    (microsoft.public.access.adp.sqlserver)
  • Re: [PATCH 19/32] drivers/hwmon/pc87360.c: Use pr_fmt and pr_
    ... The conversion was done via script and the script doesn't ... Thirdly, log messages aren't raw messages, they are format strings, so ... grepping the sources for the output is never guaranteed to work in the ...
    (Linux-Kernel)