textinput/AknInputLanguage/src/ptiInputLanguageInfo.cpp
branchRCL_3
changeset 7 6defe5d1bd39
parent 0 eb1f2e154e89
equal deleted inserted replaced
6:6ceef9a83b1a 7:6defe5d1bd39
    19 
    19 
    20 // INCLUDE FILES
    20 // INCLUDE FILES
    21 
    21 
    22 #include "AknInputLanguageInfo.h"
    22 #include "AknInputLanguageInfo.h"
    23 #include "ptiInputLanguageInfo.h"
    23 #include "ptiInputLanguageInfo.h"
       
    24 #include "e32cmn.h"
    24 
    25 
    25 // CONSTANTS
    26 // CONSTANTS
    26 const TInt KInputLanguageArrayGranularity = 10;
    27 const TInt KInputLanguageArrayGranularity = 10;
    27 
    28 
    28 // CLASS IMPLEMENTATION
    29 // CLASS IMPLEMENTATION
   165     }
   166     }
   166 
   167 
   167 EXPORT_C TAknLanguageName CT9InputLanguageInfo::LanguageName( TLanguage aLanguageCode ) const
   168 EXPORT_C TAknLanguageName CT9InputLanguageInfo::LanguageName( TLanguage aLanguageCode ) const
   168 	{
   169 	{
   169     MPtiLanguage* lang = iPtiEngineInterface->GetLanguage(aLanguageCode);
   170     MPtiLanguage* lang = iPtiEngineInterface->GetLanguage(aLanguageCode);
   170     return lang->LocalizedName();
   171     
       
   172     TAknLanguageName buf;
       
   173     if( lang != NULL )
       
   174         {
       
   175         buf.Copy( lang->LocalizedName() );
       
   176         }
       
   177     else
       
   178         {
       
   179         buf.Copy( KNullDesC );
       
   180         }
       
   181     return buf;
   171 	}
   182 	}
   172 
   183 
   173 EXPORT_C TLanguage CT9InputLanguageInfo::UrlLanguage() const
   184 EXPORT_C TLanguage CT9InputLanguageInfo::UrlLanguage() const
   174 	{
   185 	{
   175 	// English returned for default implementation
   186 	// English returned for default implementation