ui5-webcomponents DateTimePicker how to change language ?? #10020
-
I found react version DateTimePicker can easy change language |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi, the documentation is here: https://sap.github.io/ui5-webcomponents/docs/advanced/using-assets/ For example: import "@ui5/webcomponents/dist/Assets.js"; and use: with another language and another theme: import { setLanguage } from "@ui5/webcomponents-base/dist/config/Language.js"; setLanguage("es"); The ui5-date-picker component will have all translatable texts in Spanish, and the Spanish format settings (e.g. date format) will be used, and will be rendered with the sap_fiori_3_hcb accessibility theme instead of the default theme. However, it doesn't work in the latest code and we need to investigate further. I will keep you updated. Can you let me know which version of UI5 Web Components are you using? Best regards, |
Beta Was this translation helpful? Give feedback.
Hi, the documentation is here: https://sap.github.io/ui5-webcomponents/docs/advanced/using-assets/
For example:
import "@ui5/webcomponents/dist/Assets.js";
and use:
with another language and another theme:
import { setLanguage } from "@ui5/webcomponents-base/dist/config/Language.js";
import { setTheme } from "@ui5/webcomponents-base/dist/config/Theme.js";
setLanguage("es");
setTheme("sap_fiori_3_hcb");
The ui5-date-picker component will have all translatable texts in Spanish, and the Spanish format settings (e.g. date format) will be used, and will be rendered with the sap_fiori_3_hcb accessibility theme instead of the default theme.
However, it doesn't work in the latest code and we nee…