L20n by example

10. HTML Attributes

Finally, traits can also be very useful when using L20n for localization of more complex UI elements, such as HTML components.

Those elements often contain multiple translatable messages per one widget. For example, an HTML form input may have a value, but also a placeholder attribute, aria-label attribute and maybe a title attribute.

Another example would be a Web Component confirm window with okbutton , cancel button and a message.

login-input = Predefined value [html/placeholder] example@email.com [html/aria-label] Login input value [html/title] Type your login email