如何重命名“选项” Symbian 应用程序中的菜单?

发布于 2024-12-05 21:33:47 字数 247 浏览 3 评论 0原文

我的 Symbian Qt 应用程序支持多种语言,并且我已经成功翻译了所有内容,但唯一保持不变的是菜单栏,名为“选项”,即使我更改手机区域设置,菜单栏的名称也保持不变。

此外,当我打开菜单时,软键的名称为“选择”和“取消”,尽管当我更改电话区域设置时这些名称会发生​​变化。

所以,我的问题是 - 有没有办法重命名菜单栏,并在打开菜单时更改软键而不更改手机区域设置?

编辑:或者,允许重命名左软键的 Symbian 本机代码也可以。

My Qt application for Symbian supports several languages and I've managed to translate everything, but the only thing remains unchanged is menu bar, that is named "Options", even when I change phone locale, the name for menu bar remains the same.

Additionally, when I open menu, softkeys have names "Select" and "Cancel", although these names change when I change phone locale.

So, my question is - is there a way to rename menu bar, and change softkeys when menu is opened without changing phone locale?

EDIT: Alternatively, Symbian-native code, that allows to rename left soft key, would be fine.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

送你一个梦 2024-12-12 21:33:47

通常,选项和取消名称与电话的区域设置相匹配。如果您想将它们翻译成另一种语言,以下是如何在本机 Symbian 中运行时更改右软键:

// Change the Exit softkey to Hide
HBufC* hideText(CCoeEnv::Static()->AllocReadResourceLC(R_MYAPP_HIDE));
TInt pos(Cba()->PositionById(EAknSoftkeyExit));
Cba()->RemoveCommandFromStack(pos, EAknSoftkeyExit);
Cba()->SetCommandL(pos, EPodOClockCmdHide, *hideText);
CleanupStack::PopAndDestroy(hideText);

尝试 EAknSoftkeyOptions 更改左软键。

Normally the Options and Cancel names match the phone's locale. If you want to translate them into another language, here's how to change the right softkey at runtime in native Symbian:

// Change the Exit softkey to Hide
HBufC* hideText(CCoeEnv::Static()->AllocReadResourceLC(R_MYAPP_HIDE));
TInt pos(Cba()->PositionById(EAknSoftkeyExit));
Cba()->RemoveCommandFromStack(pos, EAknSoftkeyExit);
Cba()->SetCommandL(pos, EPodOClockCmdHide, *hideText);
CleanupStack::PopAndDestroy(hideText);

Try EAknSoftkeyOptions to change the left softkey.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文