i18n for Vue: translated text not loaded
Describe the documentation issue
- [X] Documentation is unclear
- [ ] Documentation is incorrect
- [ ] Documentation is missing
- [ ] Other
Description of the issue I'm new to UI5 Web Components and Vue. I'm trying to implement i18n functionality by following the document below . https://sap.github.io/ui5-webcomponents/playground/docs/i18n/ I have cloned the sample project for Vue and added config as described in the document. https://github.com/SAP-samples/ui5-webcomponents-sample-vue
Here is my github repo.
The issue is, the console shows "PLEASE_WAIT", instead of the corresponding text (Please wait).

I debugged getText function and found the variable "bundle" was receiving below html message.
sorry but ui5-webcomponents-sample-vue doesn't work properly without JavaScript enabled. Please enable it to continue.

The app runs on Chrome and for Chrome, JavaScript is enabled. Maybe some settings are missing for my project?
Regards, Mio
Hi @miyasuta
Here you can check the Vue docs related to static assets.
What you can do in order to fix your problem is make the following file structure(in the above link it is explained why your dependencies should be in the src folder)

In your App.vue file add the following lines in order to load translations correctly:
registerI18nBundle("myApp", {
de: "./i18n/messagebundle_de.properties",
en: "./i18n/messagebundle_en.properties",
});
await fetchI18nBundle("myApp");
const bundle = getI18nBundle("myApp");
const pleaseWait = bundle.getText("PLEASE_WAIT");
console.log("Please wait in the current language is: ", pleaseWait);
Hi @fifoosid .
Thank you for your comment. I tried your solution, but the still the same result. I have updated my GitHub repo. https://github.com/miyasuta/webcomponents-test If you have a working example, could you share the source?
Regards, Mio
Hi @miyasuta
I have uploaded your code here. You can check the last commit in order to see how the translations are implemented.
Hi Hi @fifoosid
Thanks for the code. I could see the translation working!