Home » U++ Library support » U++ MT-multithreading and servers » Witz internationalization
| Re: Witz internationalization [message #39562 is a reply to message #39559] |
Sat, 30 March 2013 10:16   |
|
|
Hi Zbych,
I wrote almost exactly the same function a while back 
| Quote: | Value Translate(const Vector<Value>& arg, const Renderer *) {
if(arg.GetCount() != 1 || !IsString(arg[0]))
return String();
return GetLngString(String(arg[0]));
}
INITBLOCK {
Compiler::Register("t_", Translate);
}
|
I had no problem with this implementation, but I haven't use it too extensively, so I probably wouldn't notice cache problems. Also, it is only useful for shorter strings, anything bigger is better to be placed in separate files (*.xy-xy.witz).
User language can be detected by parsing the Accept-Language HTTP header. However, it is always good idea to let the user override the setting manually (e.g. for cases when they use someone else's computer with different language settings).
Best regards,
Honza
|
|
|
|
Goto Forum:
Current Time: Fri Nov 28 08:55:51 CET 2025
Total time taken to generate the page: 0.03266 seconds
|