qualiture / ui5-validator

MIT License
42 stars 23 forks source link

[ToDo] i18n texts #12

Open TimoStahl opened 5 years ago

TimoStahl commented 5 years ago

Hi,

thanks for this script, it would be nice if the i18n-todo will be fixed.

e.g.: https://github.com/qualiture/ui5-validator/blob/master/Validator.js#L129

Thanks

zaunaro commented 3 years ago

Hi, I solved the problem by fetching the i18n property over theoControl. Therefore insert: const oResourceBundle = oControl.getModel("i18n"); const sWrongInputMessage = oResourceBundle.getProperty("i18nFileKeyInYourProject");

This code can also be used for the other messages, so you can support multilanguage in your application.

:)