*
*/
#include <iostream>
-//#include "zypp/base/Logger.h"
+#include <map>
#include "zypp/Locale.h"
namespace zypp
{ /////////////////////////////////////////////////////////////////
+ typedef std::map<std::string, std::string> OtherDefaultLanguage;
+ static OtherDefaultLanguage otherDefaultLanguage;
+
///////////////////////////////////////////////////////////////////
//
// CLASS NAME : Locale::Impl
Locale fallback() const
{
+ if (otherDefaultLanguage.size() == 0) {
+ // initial inserting map
+ otherDefaultLanguage["pt_BR"] = "en";
+ }
+
+ if (otherDefaultLanguage.find(code()) != otherDefaultLanguage.end())
+ return LanguageCode(otherDefaultLanguage[code()]);
+
if ( _country.hasCode() )
return _language;