Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

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

by zwon (Abbot)
on Mar 14, 2013 at 11:07 UTC ( #1023461=note: print w/replies, xml ) Need Help??


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

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.
  • Comment on Re^3: Is there a need for another module like Locale::Maketext/Locale::gettext

Replies are listed 'Best First'.
Re^4: Is there a need for another module like Locale::Maketext/Locale::gettext
by SBECK (Hermit) on Mar 14, 2013 at 11:46 UTC
    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://1023461]
help
Chatterbox?
[LanX]: yes I worked ...
[LanX]: ... and hope to get a free work day in compensation. :)
choroba went to a museum with the older children. The exhibition was called "American Indians".
[Discipulus]: this and...
[Discipulus]: shaving the ceil
LanX God shaves the Queen!
[marto]: plastering

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (9)
As of 2018-02-19 10:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When it is dark outside I am happiest to see ...














    Results (261 votes). Check out past polls.

    Notices?