Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Is there a need for another module like Locale::Maketext/Locale::gettext

by zwon (Monsignor)
on Mar 13, 2013 at 14:38 UTC ( #1023213=note: print w/ replies, xml ) Need Help??


in reply to Is there a need for another module like Locale::Maketext/Locale::gettext

We using Locale::Maketext with Locale::Maketext::Lexicon at work, and yes there are some problems with it. As for gettext, it is simply not usable for multiuser applications. So if you have finally found the way to do it right and willing to share, then of course you shoud release it.


Comment on Re: Is there a need for another module like Locale::Maketext/Locale::gettext
Re^2: Is there a need for another module like Locale::Maketext/Locale::gettext
by SBECK (Pilgrim) on Mar 13, 2013 at 15:10 UTC

    Could you explain what limitation you are referring to when you say that gettext is 'not usable for multiuser applications'? Since I'm not sure exactly what limitation you are referring to, I'm not sure whether my module addresses that limitation or not. I like to have my modules be pretty complete in terms of what they can do, so if there's a weakness in gettext that I'm not aware of, I'm possibly interested in addressing it.

    For what it's worth, my module is very similar to Locale::Maketext in terms of how it's used in the program.

    I've been calling my module Locale::Messages, but that name's already in use, so I'll be renaming it and releasing it shortly.

      Gettext behaviour is controlled by global variables. So if a single process wants to serve several users with different languages, it has to set locale before each print. A simplest example is a web application -- if you set locale, it will affect not just output to the user, but also what application will write in the error log, and generally people don't want to deal with a mix of languages in their logs.
        Thanks or the explanation. My module is OO and each object can have it's own search order (i.e. you can say try 'en_GB' and if that fails, 'en_US' or 'en'), so no global variables. Of course, if the application uses global variables to determine the search order, that would still be a problem, but nothing in my module determines that.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1023213]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (12)
As of 2014-09-16 18:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (40 votes), past polls