我对l20n.js有个小问题,字符串中的HTML总是转义:/。
我像这样使用l20n:
<div class="col-twelve" data-l10n-id="intro-text">
<h5>my <span style="color: whitesmoke">Title</span></h5>
<h1>Bienvenue <span class="title-separator"></span> Welcome <span class="title-separator"></span> Willkommen</h1>
<h5>Intro</h5>
</div>在我的fr.ftl中:
intro-text =
| <h5>Mon <span style="color: whitesmoke">Titre</span></h5>
| <h1>Bienvenue <span class="title-separator"></span> Welcome <span class="title-separator"></span> Willkommen</h1>
| <h5>texte intro</h5>但是,l20n.js将文本呈现如下:
<div class="col-twelve" data-l10n-id="intro-text">
| Mon titre
| Bienvenue Welcome Willkommen
| texte intro
</div>我已经做了一些搜索
所以我有点迷路了。
你知不知道?或者任何其他可以轻松翻译的javascript框架?(我需要:单独的地区文件,没有后端只有ngninx,易于读/写翻译为非IT)
谢谢。
发布于 2017-07-01 09:20:57
哼,所以昨天不是工作..。今天是工作。
我刚刚把我的超光速从:
intro-text =
| <h5>Mon <span style="color: whitesmoke">Titre</span></h5>
| <h1>Bienvenue <span class="title-separator"></span> Welcome <span class="title-separator"></span> Willkommen</h1>
| <h5>texte intro</h5>致:
intro-text =
<h5>Mon <span style="color: whitesmoke">Titre</span></h5>
<h1>Bienvenue <span class="title-separator"></span> Welcome <span class="title-separator"></span> Willkommen</h1>
<h5>texte intro</h5>也许ftl在文本之前只需要一个空格:/。
https://stackoverflow.com/questions/44859002
复制相似问题