cancel
Showing results for 
Search instead for 
Did you mean: 

Fragment calls wrong i18n path after deployment to fiori launchpad

0 Kudos

Dear Experts,

we developed a custom SAPUI5-App with one main view and two fragments. We have three i18n-files for different languages.

If I test the i18n translations in my local WebIDE everything is fine. But after we deployed the app in our Fiori launchpad an error occured while loading the i18n files.

If I open the app in the launchpad the main view is loading the correct i18n files and the labels are translated. But if I open the fragments, F12 says that it cannot load the i18n files. When I was analyzing the Network requests I noticed, that the main view is calling the correct path of the i18n file but the fragments are calling another path wich is wrong and after that there is a 404 error (not found).

I tried many things:

  • Set the i18n model for every single fragment
  • Use the function "addDependent" in the create and calling methods for the fragment
  • Check the manifest.json and the component.js for wrong resources or path
  • Check the mapping file of the bsp application

Nothing works. And again: It works in my local test environment.

Inside the launchpad the main view is calling the correct path: https://XXX/sap/bc/ui5_ui5/sap/zindivsel_nmf/~A511A000B4A95D2839F3719D216182DE~5/i18n/i18n_it.proper...

Inside the launchpad the fragments are calling the wrong path: https://XXX/sap/bc/ui5_ui5/ui2/ushell/shells/abap/i18n/i18n_it.properties

Did somebody know why this happens and how can I fix it?

Regards,

Tim

junwu
Active Contributor
0 Kudos

why not put your model in manifest.json?

View Entire Topic
UxKjaer
Product and Topic Expert
Product and Topic Expert
0 Kudos

Can you please show the code where you are appending the fragment. You might be able to use the answer from this. https://stackoverflow.com/questions/25636637/localizationi18n-in-sapui5-for-fragment-xml-file-in-not...

0 Kudos

Hi Jakob,

thanks for your answer. I attached my coding to this answer as a screenshot including the structure of my app to give you a better understanding of what I`m doing.

Explanation to the screenshots:

  1. I have one Controller that is responsible for my MainView and my fragments
  2. I created a container for my fragment with a ViewSettingsDialog
  3. And I tried to set the model directly to the fragment when the button pressed and also when the container was created including "addDependent" (tried in both methods)
  4. There you will see the simple xml coding of my fragment with the normal i18n binding

FYI: Maybe there is something obsolet in my coding because I tried many things in case of my issue 😉

Is there anything wrong with that coding? If yes, I`m wondering why it works in my local test environment.

If I have a look at the coding of your recommended link: I think there is nothing new compared to my coding. What do you think?

Thanks for your help!

Regards,

Tim

1-app-structure.png

2-create-basic-fragment-container.png

3-action-sort-button-pressed.png

4-xml-sort.png