Localize attribute with l20n

I would like to localize the placeholder attribute with L20N. I cannot find anything in my documentation and this (not surprisingly) does not work.

 <input type="text" data-l10n-id="email" /> 
+8
html internationalization attributes localization l20n
source share
1 answer

A normal translation (meaning you want to replace the content) is written as follows:

 <test "this is a translated text"> 

Then you can translate the attributes as follows:

 <test "this is a translated text" title:"this is the title"> 

In your case, you only need the attribute, so it will work:

 <test placeholder:"this is a translated text"> 

HTML should be

 <input type="text" data-l10n-id="test" placeholder="" /> 
+12
source share

All Articles