MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / suggestLanguage

Method suggestLanguage

gui/translationhandler.cpp:155–170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

153}
154
155QString TranslationHandler::suggestLanguage() const
156{
157 //Get language from system locale's name ie sv_SE or zh_CN
158 QString language = QLocale::system().name();
159 //qDebug()<<"Your language is"<<language;
160
161 //And see if we can find it from our list of language files
162 const int index = getLanguageIndexByCode(language);
163
164 //If nothing found, return English
165 if (index < 0) {
166 return "en";
167 }
168
169 return language;
170}
171
172void TranslationHandler::addTranslation(const char *name, const char *filename)
173{

Callers 1

mainFunction · 0.80

Calls 1

nameMethod · 0.45

Tested by

no test coverage detected