Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Localize an attribute with l20n

I'd like to localize a placeholder attribute with L20N. I can't find anything in their documentation, and doing this (unsurprisingly) doesn't work.

<input type="text" data-l10n-id="email" />
like image 815
Levi Botelho Avatar asked Mar 29 '15 12:03

Levi Botelho


1 Answers

A normal translation (meaning you want to replace the content) is written like this:

<test "this is a translated text">

You can then translate attributes like this:

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

In your case, you only want the attribute, so this will work:

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

The HTML should be

<input type="text" data-l10n-id="test" placeholder="" />
like image 195
JohnKiller Avatar answered Nov 05 '22 06:11

JohnKiller