-
Notifications
You must be signed in to change notification settings - Fork 273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configuration - fetchDefaultLanguage unclear for custom 18n bundles #3165
Comments
Hello @SAP/ui5-webcomponents-team , Can you please check this problem with application (custom) i18n properties files which do not get inlined by default. Or the documentation might need update. Regards, |
Hi @HappyHepo, the build tools (for components) work on
The See an example of the defaults file generated here: Then components pass the object from this file to the translation function, and if the current language is english, the text from the If for some reason the json file contains different data from the inlined data, this option From your description, it seems that you did not use the tooling to generate the json files and you have no Currently, the tooling for i18n is only usable by components, but a change is on the way to extract it as a separate npm package. Check it out here: Any input on how to shape this for app usage will be very helpful. |
Hi @pskelin, I use the i18n functionality for a standalone (angular) app which uses ui5-webcomponents for the UI. I directly created json files as per the Tips and Trick section of i18n for apps, to reduce runtime size. A CLI mode, as you mentioned in the change, would be neccessary to use it from the build script. |
Describe the documentation issue
Description of the issue
A clear and concise description.
Configuration - fetchDefaultLanguage describes that the default language is inlined by default.
This does not appear to be the case when using custom i18n files. Only the i18n ids are shown and the bundle is empty.
When setting
fetchDefaultLanguage: true
, the bundle works as expected.The i18n for apps documentation also does not mention this.
Please clarify, that "If for some reason it is necessary to fetch the default language text from the network as well, use this setting." does include custom i18n, possibly also on the i18n documentation page.
The text was updated successfully, but these errors were encountered: