- // Cheat! Copy the .mo file
- std::ifstream src( std::string( DEFAULT_EN_LOCALE_DIR + "dali-toolkit.mo.en" ).c_str(), std::ifstream::binary );
- std::ofstream dst( std::string( DEFAULT_EN_LOCALE_DIR + "dali-toolkit.mo" ).c_str(), std::ofstream::binary );
- dst << src.rdbuf();
+ // Keep the current locale environment.
+ char* langPtr = getenv( "LANG" );
+ gLocaleLang = std::string( langPtr );
+
+ char* languagePtr = getenv( "LANGUAGE" );
+ gLocaleLanguage = std::string( languagePtr );
+
+ // Set the locale environment to Arabic.
+ setenv( "LANG", "en_GB.UTF-8", 1 );
+ setenv( "LANGUAGE", "en_GB:en", 1 );