gpt4 book ai didi

html - 使用 l20n 本地化属性

转载 作者:太空狗 更新时间:2023-10-29 13:42:39 24 4
gpt4 key购买 nike

我想用 L20N 本地化一个 placeholder 属性。我在他们的文档中找不到任何内容,并且这样做(不出所料)不起作用。

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

最佳答案

一个正常的翻译(意思是要替换内容)是这样写的:

<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="" />

关于html - 使用 l20n 本地化属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29329204/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com