| 224 | } |
| 225 | |
| 226 | void ASLocalizer::setTranslationClass() |
| 227 | // Return the required translation class. |
| 228 | // Sets the class variable m_translation from the value of m_langID. |
| 229 | // Get the language ID at http://msdn.microsoft.com/en-us/library/ee797784%28v=cs.20%29.aspx |
| 230 | { |
| 231 | assert(m_langID.length()); |
| 232 | if (m_langID == "zh" && m_subLangID == "CHS") |
| 233 | m_translation = new ChineseSimplified; |
| 234 | else if (m_langID == "zh" && m_subLangID == "CHT") |
| 235 | m_translation = new ChineseTraditional; |
| 236 | else if (m_langID == "en") |
| 237 | m_translation = new English; |
| 238 | else if (m_langID == "es") |
| 239 | m_translation = new Spanish; |
| 240 | else if (m_langID == "fr") |
| 241 | m_translation = new French; |
| 242 | else if (m_langID == "de") |
| 243 | m_translation = new German; |
| 244 | else if (m_langID == "hi") |
| 245 | m_translation = new Hindi; |
| 246 | else // default |
| 247 | m_translation = new English; |
| 248 | } |
| 249 | |
| 250 | //---------------------------------------------------------------------------- |
| 251 | // Translation base class methods. |