Ruby GetText and multiple threads

J

Jamis Buck

Given a process that runs multiple threads (i.e., WEBrick), where each
thread may be completely different from the other threads, how would
GetText work? In particular, what if the output from each thread needed
to be rendered for a different locale?

My understanding of the Ruby GetText module is that the class itself is
bound to a specific domain and locale... it seems to me that the use of
the class as a singleton then precludes the use of this module in a
multi-threaded, multi-locale environment.

If this is the case (and I'd be happy to be wrong), is there another
approach that can still take advantage of gettext's message files? If
worse comes to worst I may just create an instantiable variation of the
Ruby GetText module.

- Jamis

--
Jamis Buck
(e-mail address removed)
http://www.jamisbuck.org/jamis

"I use octal until I get to 8, and then I switch to decimal."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top