Changeset View
Changeset View
Standalone View
Standalone View
formatters/astyle/lib/ASLocalizer.cpp
Show First 20 Lines • Show All 73 Lines • ▼ Show 20 Line(s) | |||||
74 | #ifndef ASTYLE_LIB | 74 | #ifndef ASTYLE_LIB | ||
75 | 75 | | |||
76 | //---------------------------------------------------------------------------- | 76 | //---------------------------------------------------------------------------- | ||
77 | // ASLocalizer class methods. | 77 | // ASLocalizer class methods. | ||
78 | //---------------------------------------------------------------------------- | 78 | //---------------------------------------------------------------------------- | ||
79 | 79 | | |||
80 | ASLocalizer::ASLocalizer() | 80 | ASLocalizer::ASLocalizer() | ||
81 | // Set the locale information. | 81 | // Set the locale information. | ||
82 | { | | |||
83 | // set language default values to english (ascii) | 82 | // set language default values to english (ascii) | ||
84 | // this will be used if a locale or a language cannot be found | 83 | // this will be used if a locale or a language cannot be found | ||
85 | m_localeName = "UNKNOWN"; | 84 | : m_localeName("UNKNOWN") | ||
86 | m_langID = "en"; | 85 | , m_langID("en") | ||
87 | m_lcid = 0; | 86 | , m_lcid(0) | ||
87 | , m_translation(nullptr) | ||||
88 | { | ||||
88 | m_subLangID.clear(); | 89 | m_subLangID.clear(); | ||
89 | m_translation = NULL; | | |||
90 | 90 | | |||
91 | // Not all compilers support the C++ function locale::global(locale("")); | 91 | // Not all compilers support the C++ function locale::global(locale("")); | ||
92 | // For testing on Windows change the "Region and Language" settings or use AppLocale. | 92 | // For testing on Windows change the "Region and Language" settings or use AppLocale. | ||
93 | // For testing on Linux change the LANG environment variable: LANG=fr_FR.UTF-8. | 93 | // For testing on Linux change the LANG environment variable: LANG=fr_FR.UTF-8. | ||
94 | // setlocale() will use the LANG environment variable on Linux. | 94 | // setlocale() will use the LANG environment variable on Linux. | ||
95 | 95 | | |||
96 | char* localeName = setlocale(LC_ALL, ""); | 96 | char* localeName = setlocale(LC_ALL, ""); | ||
97 | if (localeName == NULL) // use the english (ascii) defaults | 97 | if (localeName == NULL) // use the english (ascii) defaults | ||
▲ Show 20 Lines • Show All 732 Lines • Show Last 20 Lines |