visol/translationapi
最新稳定版本:4.0.0
Composer 安装命令:
composer require visol/translationapi
包简介
API to fetch translation units.
README 文档
README
This extension lets you fetch localized labels from TYPO3. It will automatically
export labels as JSON from any locallang.xlf file, given its extension key.
How-To Use within Fluid
This extension is able to export the labels as JSON to be embedded into a HTML snippet:
<div
xmlns="http://www.w3.org/1999/xhtml" lang="en"
xmlns:f="http://typo3.org/ns/TYPO3/Fluid/ViewHelpers"
xmlns:l10n="http://typo3.org/ns/Sinso/Translationapi/ViewHelpers"
>
<!-- standard notation -->
<l10n:exportXliff extensionKey="some-extension" prefix="some-prefix" />
<!-- inline notation -->
<section data-localized-days='{l10n:exportXliff(extensionKey:"some-extension", prefix:"some-prefix")}'>
...
</section>
</div>
Options
-
?omitPrefix=yes(default "no") will strip the prefix from the key. E.g. with "module" as prefix,key "module.foo.bar" will be returned as "foo.bar"
-
?expand=yes(default "no") will "expand" the keys as subarrays:{ "module.foo.bar.key1": "value1", "module.foo.bar.key2": "value2", }becomes
{ "module": { "foo": { "bar": { "key1": "value1", "key2": "value2" } } } }
统计信息
- 总下载量: 3.9k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2021-12-02