cancel
Showing results for 
Search instead for 
Did you mean: 

Fiori application with specific language

saeed_asghari
Explorer
0 Kudos

Hi

I extended an standard fiori application (my leave request) , this extension includes i18n and I did not change anything else.My Issue is :When I run the app its lables are in english but I expect to see Persian(FA) as I extend the App.

I want to set Specific language(for example: FA - Persian) in my Fiori application.

i did everything correct and my application translated, just the only thing that i want is my launchpad open in EN language and my desired app in FA Language.

now i want to know how can i ignore launchpad language for my Fiori application?

(if i choose 'FA' for launchpad at Logon Page , my application will be show in translated language but as i said i want to execute application in different language )

As you can see i tested every way that i knew(i tested these one by one):

data-sap-ui-ignoreUrIParams="true"

data-sap-ui-language="fa"

data-sap-ui-xx-supportedLanguages="fa"

Thanks & Regards.

Saeed.A

Accepted Solutions (1)

Accepted Solutions (1)

junwu
Active Contributor

sap.ui.getCore().getConfiguration().setLanguage("fa")

check if it helps. it may change the whole launchpad...

saeed_asghari
Explorer
0 Kudos

HI

Thanks A lot.

My problem solved.

I added in onInit() and as you said the whole launchpad changed to 'RTL'.

So I added your code with 'en' language in onExit() too.

now this is the best way i could do this.

again and again , thank you sir

Answers (1)

Answers (1)

junwu
Active Contributor

add this code in your component js.

var i18nModel = new ResourceModel({
bundleName: "YOURNAMESPACE.i18n.i18n",

bundleLocale:"fa"


});
this.setModel(i18nModel, "i18n");

saeed_asghari
Explorer
0 Kudos

Hi

thanks for your answer but it doesn't work.

exactly i puted your code in Component.js but it had error , so i tested your code in 'onInit' function.

it doesn't raise error and doesn't effect on my application

junwu
Active Contributor
0 Kudos

I think you need this one in your init function. "oninit" is not the correct name.

hcm.fab.myleaverequest.Component.prototype.init.apply(this, arguments);

saeed_asghari
Explorer
0 Kudos

Hi again

First of all thank you for your answers

my problem solved but not completly 😞 let me exmplain

as i said before, it's extension project and there are restriction for codding anywhere so i added another extension(Extend Controller):

Then added these codes in it :

it works!!

My application executing in 'FA' language but it's not 'RTL'.

now i'm trying to change it from 'LTR' to 'RTL' direction.

i will be appreciate if you share any recommendation

Thanks & Regards

Saeed.A

junwu
Active Contributor
0 Kudos

what's version of your ui5?

saeed_asghari
Explorer
0 Kudos

Application : 1.44.12

SAP System : 1.84.1