1

Please find the below Qml code,

actions: [

                ActionItem {
                    title: qsTr("Custom Market Watch") + Retranslate.onLanguageChanged
                    ActionBar.placement: ActionBarPlacement.InOverflow
                    onTriggered: {
                        _app.dropSymbols(1); // Drop Req for Tadawul
                        lightTimer.stop();
                        _app.GenerateCustWatch(1, translate.text);

                    }
                },

                ActionItem {

                    title: qsTr("Alerts") + Retranslate.onLanguageChanged
                    ActionBar.placement: ActionBarPlacement.InOverflow
                    onTriggered: {
                        _app.dropSymbols(1); // Drop Req for Tadawul
                        lightTimer.stop();
                        _app.AddAlerts(1, translate.text);

                    }
                    imageSource: "asset:///images/alert_title_icon.png"
                },
                ActionItem {
                    title: qsTr("Portfolio")+Retranslate.onLanguageChanged
                    ActionBar.placement: ActionBarPlacement.InOverflow
                    onTriggered: {
                        _app.dropSymbols(1); // Drop Req for Tadawul
                        lightTimer.stop();
                        _app.CreatePortfolio(1, translate.text);
                    }
                    imageSource: "asset:///images/portfolio_title_icon.png"

                },
                ActionItem {
                    title: qsTr( "News Feeds")+Retranslate.onLanguageChanged
                    ActionBar.placement: ActionBarPlacement.InOverflow
                    onTriggered: {
                        _app.dropSymbols(1); // Drop Req for Tadawul
                        lightTimer.stop();
                        var feeds = newsFeeds.createObject();
                        feeds.navId = {
                            'id': navTab,
                            'langSettings': translate.text
                        }
                        navTab.push(feeds);
                    }
                    imageSource: "asset:///images/news_feed_icon.png"

                },
                ActionItem {
                    title: qsTr("Language")+ Retranslate.onLanguageChanged
                    ActionBar.placement: ActionBarPlacement.InOverflow
                    onTriggered: {
                        //_app.ChangeAppLanguage();
                        var go = langsettings.createObject();
                        go.lang = {
                            'lang': _app.getCurrentLocale()
                        }
                        go.setLanguage(_app.getCurrentLocale());
                        navTab.push(go);
                        //_app.changeOrientation();
                    }
                    imageSource: "asset:///images/language_icon.png"
                },
               /* ActionItem {
                    title: qsTr("Support") + Retranslate.onLanguageChanged
                    ActionBar.placement: ActionBarPlacement.InOverflow
                    onTriggered: {
                        invoke.query.setUri("pin:2ADAEE2D")
                        invoke.trigger("bb.action.INVITEBBM")
                    }//InvokeActionItem
                    imageSource: "asset:///images/support_icon.png"
                },*/
                InvokeActionItem {
                    id:supportBBM          
                    title: qsTr("Support") + Retranslate.onLanguageChanged
                    ActionBar.placement: ActionBarPlacement.OnBar

                    imageSource: "asset:///images/support_icon.png"
                    query {
                        invokeActionId: "bb.action.INVITEBBM"
                        uri: "pin:2ADAEE2D"
                    }
                },

                InvokeActionItem {
                    id:shareBB
                    title: qsTr("Share to Friends") + Retranslate.onLanguageChanged
                    ActionBar.placement: ActionBarPlacement.OnBar

                    query {
                        mimeType: "text/plain"
                        // invokeTargetId: "sys.bbm.sharahandler"
                        invokeActionId: "bb.action.SHARE"
                    }
                    onTriggered: {

                        data = "Hi I am using Trading App, you can download it form the link http://appworld.blackberry.com/webstore/?&lid=in:bb:apps&lpos=in:bb:apps&countrycode=IN&lang=en!";
                    }
                },
                ActionItem {
                    title: qsTr("Subscription") + Retranslate.onLanguageChanged
                    ActionBar.placement: ActionBarPlacement.InOverflow
                    onTriggered: {
                        _app.getSubscriptionStatus(1);
                    }
                    imageSource: "asset:///images/status_icon.png"
                },
                ActionItem {
                    title: qsTr("About mTadawul") + Retranslate.onLanguageChanged
                    ActionBar.placement: ActionBarPlacement.InOverflow
                    onTriggered: {
                        var about= mTadawulNote.createObject();

                        about.navId = {
                            'id': navTab
                        }
                        navTab.push(about);

                    }
                    imageSource: "asset:///images/about_icon.png"
                },

                ActionItem {
                    title: qsTr("Exit Application") + Retranslate.onLanguageChanged
                    ActionBar.placement: ActionBarPlacement.InOverflow
                    onTriggered: {
                        _app.exitApp();
                    }
                    imageSource: "asset:///images/app_exit.png"
                }

            ]

I am showing Arabic titles for above qml after changing to "English to Arabic ". but it is not working for InvokeActionItem. why? what i am missing?

please help, Thanks!!!

Sharath
  • 315
  • 1
  • 3
  • 13

1 Answers1

0

Depending on the specificity of the query in you InvokeActionItem it may result in 0 to many items in the menu. I'm guessing, but it is possible that because of this the action of having + Retranslate.onLanguageChanged is not being propigated to the ultimate UI object that the system is building for you.

The other possibility is that the translation system can't find the appropriate language strings for those objects for the same reason.

Richard
  • 8,920
  • 2
  • 18
  • 24