Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous messageGo to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1792
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Hi Zbych,

I wrote almost exactly the same function a while back Smile
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
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Cant connect but dont get an error
Next Topic: Is there a Threadpool in U++?
Goto Forum:
  


Current Time: Tue Aug 26 22:13:19 CEST 2025

Total time taken to generate the page: 0.05163 seconds