title: boost locale c++ - understanding the basics
body: <p>First of all How do i make the following example work (from boost website):</p>
  
  <pre><code>        #include &lt;boost/locale.hpp&gt;
          #include &lt;iostream&gt;
  
          using namespace std;
          using namespace boost::locale;
  
          int main()
          {
              generator gen;
  
              // Specify location of dictionaries
              gen.add_messages_path(".");
              gen.add_messages_domain("hello");
  
              // Generate locales and imbue them to iostream
              locale::global(gen(""));
              cout.imbue(locale());
  
              // Display a message using current system locale
              cout &lt;&lt; translate("Hello World") &lt;&lt; endl;
          }
  </code></pre>
  
  <p>(tried creating an hello.mo file but still didn't work).</p>
  
  <p>Basically what i am trying to do is to be able to cout a string like: "operation",
  and then according to file1 / file2 it will print the string value under id:operation for that specific file. </p>
  
  <p>how can i do that?</p>
  
  <p>Thanks.</p>