如何在 Symbian S60 上切换语言
我下面使用的代码假设将系统活动输入/书写语言切换为法语,但事实并非如此(对于任何已安装的语言都是如此)。
我正在诺基亚 E7、Symbian Anna 上进行测试。
我正在使用 Symiban SDK S^3。
我的手机中安装了法语。
使用ActivateLanguageL()后,我通过CurrentLanguage()测试查看哪种活动语言,它返回给我法语,但事实上这并没有发生。
CPtiEngine* eng = CPtiEngine::NewL( ETrue );
CleanupStack::PushL( eng );
if ( eng->NumberOfLanguages() )
{
RArray<TInt> languages;
eng->GetAvailableLanguagesL( languages );
// see if French language is there in list of available input languages and if "yes", activate finnish input.
for(TInt i=0;i<languages.Count();i++)
{
if(languages[i] ==ELangFrench)
{
eng->ActivateLanguageL(ELangFrench,eng->InputMode());
MPtiLanguage* x = eng->CurrentLanguage();
CEikonEnv::InfoWinL(x->LocalizedName(), _L(""));
eng->CloseCurrentLanguageL();
}
}
languages.Close();
}
CleanupStack::Pop(eng);
delete eng;
非常感谢。
The code I'm using below suppose to switch system active input / writing language to French , but It doesn't ( The same thing for any of the installed languages ).
I'm testing it on Nokia E7, Symbian Anna.
I'm using Symiban SDK S^3.
I have French language installed in my phone.
After using ActivateLanguageL(), I test to see what active language via CurrentLanguage(), and it returns me French, but in fact that doesn't happen.
CPtiEngine* eng = CPtiEngine::NewL( ETrue );
CleanupStack::PushL( eng );
if ( eng->NumberOfLanguages() )
{
RArray<TInt> languages;
eng->GetAvailableLanguagesL( languages );
// see if French language is there in list of available input languages and if "yes", activate finnish input.
for(TInt i=0;i<languages.Count();i++)
{
if(languages[i] ==ELangFrench)
{
eng->ActivateLanguageL(ELangFrench,eng->InputMode());
MPtiLanguage* x = eng->CurrentLanguage();
CEikonEnv::InfoWinL(x->LocalizedName(), _L(""));
eng->CloseCurrentLanguageL();
}
}
languages.Close();
}
CleanupStack::Pop(eng);
delete eng;
Many thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我想知道如果您重新启动设备会发生什么?当您通过手机的系统工具更改语言时,手机会在语言更改后自行重新启动
I wonder what would happen if you reboot the device? When you change language via phone's system tools then phone reboots itsself after language change
我联系了诺基亚技术支持,他们表示要更改系统输入/书写语言,我们需要使用需要与诺基亚合作的内部 API,该 API 仅适用于公司,不适用于个人开发人员。
I contacted Nokia Technical Support, and they stated that to change system input / writing language we need to use an Internal APIs that requires partnering with Nokia, which is only available for companies not for individual developers.