cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Localization in MII using SAPUI5

Former Member
0 Kudos
480

Hello All,

I am trying localization using SAPUI5 and for the same reason I am trying to call resource bundle from META-INF in js file using the following syntax

url: '/XMII/Catalog?ObjectName=CustomerExamples/META-INF/Bundles/<Project>_<language>.properties&Mode=LOAD'

But, I am getting below error while referring to the above syntax.

Error: resource URL '/XMII/Catalog?ObjectName=CustomerExamples/META-INF/Bundles/<Project>_<language>.properties&Mode=LOAD' has unknown type (should be one of .properties,.hdbtextbundle).

Please let me know if there is any fix to it or something that is missing in the above syntax.

Thanks.

Harsh

View Entire Topic
former_member185280
Active Contributor
0 Kudos

Harsh,


I don't think you can use the Catalog service directly to get the resource files. I think it returns an xml file with the properties file binary encoded within. Check in your browsers developer tools network or resources tab to see what MII is actually sending you.

Regards,
Christian

Former Member
0 Kudos

Hi Christian,

Thanks for your response.

I have tried adding content-type = text/json to it and it will get me data in json format but i believe it has something to do with the syntax only as the error show that some parameter needs to be defined in the syntax itself so as to access the resource bundle in META-INF.

Please let me know if you find something after digging more into it.

Thanks.

Harsh

former_member185280
Active Contributor
0 Kudos

Harsh,
I spent a lot of time dealing with the Catalog services writing an application to integrate with the MII virtual file system via FTP. I could be wrong but in my experience the Catalog service will not return the file in a way that the ui5 localization infrastructure wants. It returns a file containing the properties file as an encoded string. If there is a way to use the Catalog service to get the localization files then Pradip or someone else will have to provide a more complete example.

Regards,
Christian