cocos2dx之獲取當前的輸入法語言

_Proxy發表於2020-04-07

它是直接利用CCApplication中的getCurrentLanguage獲得當前輸入法,直接看例子吧:

 ccLanguageType currentLanguageType = CCApplication::sharedApplication()->getCurrentLanguage();

提供瞭如下語言:

typedef enum LanguageType
{
    kLanguageEnglish = 0,
    kLanguageChinese,
    kLanguageFrench,
    kLanguageItalian,
    kLanguageGerman,
    kLanguageSpanish,
    kLanguageRussian,
    kLanguageKorean,
    kLanguageJapanese,
    kLanguageHungarian,
    kLanguagePortuguese,
    kLanguageArabic
} ccLanguageType;


相關文章