Closed boredom2 closed 4 years ago
@boredom2 GettextTranslater is just a wrapper of PHP gettext native extension.
The locale configuration for each request is independent, so you can return many different responses in different languages. This is due the way PHP works, in which it creates a new independente thread for each request and destroy it after send the response, so no data is shared between different requests.
Thanks for these Insights. I could confirm that in the Meantime I was able to confirm this Behaviour.
Hi there,
this is not an Issue, but an important Question came up - sorry, if this Question is already answered somewhere, we couldnt find a definitve Answer yet. If we work with GettextTranslater (so, with .po and .mo) Files - from my Understanding, the appropriate Files will be selected by LC_MESSAGES, which is a System-Wide Constant?
What will happen, if the Server handles 500 Requests with Users in 10 different Languages simultaneously - is it really safe to assume, that each Request returns the Strings in the desired Session Language? If everything is handled by a System Constant, wont this influence the other running Requests then?
And if this is true - what is a better Alternative for this Scenario?
Thanks, Christoph