title: Bests practices for localized texts in C++ cross-platform applications?
body: <p>In the current C++ standard (C++03), there are too few specifications about text localization and that makes the C++ developer's life harder than usual when working with localized texts (certainly the C++0x standard will help here later).</p>
  
  <h3>Assuming the following scenario (which is from real PC-Mac game development cases):</h3>
  
  <ol>
  <li><strong>responsive (real time) application</strong>: the application has to minimize non-responsive times to "not noticeable", so speed of execution is important.</li>
  <li><strong>localized texts</strong>: displayed texts are localized in more than two languages, potentially more - don't expect a fixed number of languages, should be easily extensible.</li>
  <li><strong>language defined at runtime</strong>: the texts should not be compiled in the application (nor having one application per language), you get the chosen language information at application launch - which implies some kind of text loading.</li>
  <li><strong>cross-platform</strong>: the application is be coded with cross-platform in mind (Windows - Linux/Ubuntu - Mac/OSX) so the localized text system have to be cross platform too.</li>
  <li><strong>stand-alone application</strong>: the application provides all that is necessary to run it; it won't use any environment library or require the user to install anything other than the OS (like most games for example).</li>
  </ol>
  
  <h2>What are the best practices to manage localized texts in C++ in this kind of application?</h2>
  
  <p>I looked into this last year that and the only things I'm sure of are that you should use <code>std::wstring</code> or <code>std::basic_string&lt;ABigEnoughType&gt;</code> to manipulate the texts in the application. I stopped my research because I was working more on the "text display" problem (in the case of real-time 3D), but I guess there are some best practices to manage localized texts in raw C++ beyond just that and "use Unicode".</p>
  
  <p>So, all best-practices, suggestions and information (cross-platform makes it hard I think) are welcome!</p>