8

我想placeholder用 L20N 本地化一个属性。我在他们的文档中找不到任何东西,这样做(不出所料)是行不通的。

<input type="text" data-l10n-id="email" />
4

1 回答 1

12

一个普通的翻译(意思是你要替换内容)是这样写的:

<test "this is a translated text">

然后,您可以像这样翻译属性:

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

在您的情况下,您只需要该属性,因此这将起作用:

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

HTML 应该是

<input type="text" data-l10n-id="test" placeholder="" />
于 2015-04-03T15:08:42.740 回答