src/hbcore/i18n/hblanguageutil.cpp
changeset 2 06ff229162e9
parent 1 f7ac710697a9
child 3 11d3954df52a
equal deleted inserted replaced
1:f7ac710697a9 2:06ff229162e9
    60 
    60 
    61 #if defined(Q_OS_SYMBIAN)
    61 #if defined(Q_OS_SYMBIAN)
    62 /*!
    62 /*!
    63     \brief Returns identifiers and localized names of all known languages.
    63     \brief Returns identifiers and localized names of all known languages.
    64       
    64       
    65     \return Localized names and integer identifiers of languages supported in a device  
    65     \return localized names and integer identifiers of languages supported in a device  
    66 */
    66 */
    67 QHash<int, QString> readLanguageList()
    67 QHash<int, QString> readLanguageList()
    68 {
    68 {
    69     QHash<int, QString> hashLanguages;
    69     QHash<int, QString> hashLanguages;
    70     QString path = "c:";
    70     QString path = "c:";
   105 
   105 
   106 /*!
   106 /*!
   107     \brief Changes the system UI language.
   107     \brief Changes the system UI language.
   108       
   108       
   109     \param language identifier of the language  
   109     \param language identifier of the language  
       
   110     \return true if operation was successful
   110 */
   111 */
   111 bool setLocale( int language )
   112 bool setLocale( int language )
   112 {
   113 {
   113     TExtendedLocale dummy;
   114     TExtendedLocale dummy;
   114     QString no;
   115     QString no;
   132  
   133  
   133     Language names are localized according the language's native presentation.
   134     Language names are localized according the language's native presentation.
   134     Language ID's returned by this functions may be used as language parameter for changeLanguage(int language) function.
   135     Language ID's returned by this functions may be used as language parameter for changeLanguage(int language) function.
   135     Language IDs and names are OS specific and may vary across the platforms and releases.
   136     Language IDs and names are OS specific and may vary across the platforms and releases.
   136      
   137      
   137     \return Localized names and integer identifiers of languages supported in a device  
   138     \return localized names and integer identifiers of languages supported in a device  
   138 */
   139 */
   139 QHash<int, QString> HbLanguageUtil::supportedLanguages()
   140 QHash<int, QString> HbLanguageUtil::supportedLanguages()
   140 {
   141 {
   141 #if defined(Q_OS_SYMBIAN)   
   142 #if defined(Q_OS_SYMBIAN)   
   142     QHash<int, QString> languages; 
   143     QHash<int, QString> languages; 
   179  
   180  
   180     Language names are localized according the language's native presentation.
   181     Language names are localized according the language's native presentation.
   181     Language ID's returned by this functions may be used as language parameter for changeLanguage(int language) function.
   182     Language ID's returned by this functions may be used as language parameter for changeLanguage(int language) function.
   182     Language IDs and names are OS specific and may vary across the platforms and releases.
   183     Language IDs and names are OS specific and may vary across the platforms and releases.
   183      
   184      
   184     \return Localized names and integer identifiers of known languages 
   185     \return localized names and integer identifiers of known languages 
   185 */
   186 */
   186 QHash<int, QString> HbLanguageUtil::allLanguages()
   187 QHash<int, QString> HbLanguageUtil::allLanguages()
   187 {
   188 {
   188 #if defined(Q_OS_SYMBIAN)  
   189 #if defined(Q_OS_SYMBIAN)  
   189     QHash<int, QString> langs; 
   190     QHash<int, QString> langs; 
   257     return false;
   258     return false;
   258 #endif
   259 #endif
   259 }
   260 }
   260 
   261 
   261 /*!
   262 /*!
   262     \brief Returns ID of current language. Localized name 
   263     \brief Returns ID of current language. 
   263   
   264   
   264     \return identifier of current system language
   265     \return identifier of current system language
   265 */ 
   266 */ 
   266 int HbLanguageUtil::currentLanguage()
   267 int HbLanguageUtil::currentLanguage()
   267 {
   268 {