diff -r b1ea1642412e -r ac7e4d1d9209 textinput/peninputgenericvkb/src/peninputgenericvkbwindow.cpp --- a/textinput/peninputgenericvkb/src/peninputgenericvkbwindow.cpp Thu Jul 15 19:01:13 2010 +0300 +++ b/textinput/peninputgenericvkb/src/peninputgenericvkbwindow.cpp Thu Aug 19 10:15:25 2010 +0300 @@ -37,7 +37,7 @@ #include #include #include - +#include #include #include #include @@ -95,7 +95,8 @@ iPopupSet(EFalse), iLafMgr(NULL), iFirstConstruct(ETrue), - iIndiWithText( EFalse ) + iIndiWithText( EFalse ), + iUSRscFileExist( EFalse ) { } @@ -140,6 +141,20 @@ iLafMgr->SetInputModeL(TPluginInputMode (iLayoutContext->LayoutType())); CPeninputLayoutWindowExt::ConstructL(); + // Save whether American rsc file exist or not + TBuf usUSRscFileName; + usUSRscFileName= KConfigurationResourceFile(); + usUSRscFileName.AppendNum( ELangAmerican ); + usUSRscFileName.Append( KResourceFileExtName ); + + RFs fileSession; + User::LeaveIfError( fileSession.Connect() ); + CleanupClosePushL( fileSession ); + if ( BaflUtils::FileExists( fileSession , usUSRscFileName )) + { + iUSRscFileExist = ETrue; + } + CleanupStack::PopAndDestroy( 1 ); // For addition of ITI features, add a candidate list in vkb window CreateCandidateListL(); } @@ -458,8 +473,12 @@ file.Close(); aLangID = ELangCanadianFrench; } - } + // If US Rsc file exist, use it instead of English rsc file + if(( aLangID == ELangEnglish ) && ( iUSRscFileExist )) + { + aLangID = ELangAmerican; + } iResourceFilename.Zero(); // Generate resource file name according to language id iResourceFilename = KConfigurationResourceFile();