amdeu/typo3-locallang-formats
最新稳定版本:1.0.1
Composer 安装命令:
composer require amdeu/typo3-locallang-formats
包简介
Alternative locallang formats - Registers Symfony's built-in translation loaders for TYPO3 locallang files, enabling YAML, JSON, PHP, INI, CSV, and PO formats as alternatives to XLF
README 文档
README
Registers Symfony's built-in translation loaders for TYPO3 locallang files, enabling YAML, JSON, PHP, INI, CSV, and PO as alternatives to XLF.
Requirements
TYPO3 14.3 or later
Installation
composer require amdeu/typo3-locallang-formats
How it works
TYPO3 v14 uses the Symfony Translation component
internally. This extension registers Symfony's built-in file loaders for additional
formats via $GLOBALS['TYPO3_CONF_VARS']['LANG']['loader']. No custom parser code —
just wiring.
XLF is always checked first (TYPO3 core default), so existing extensions are unaffected.
Usage
Identical to XLF — use the file's actual extension in the path:
<f:translate key="LLL:EXT:my_ext/Resources/Private/Language/locallang.yaml:my.key" />
Follow TYPO3's locallang file naming convention, translations prefixed with the locale:
Resources/Private/Language/
locallang.yaml ← default (English)
de.locallang.yaml ← German
fr.locallang.yaml ← French
Nested keys are flattened with dot notation by Symfony's loaders:
# locallang.yaml login: title: Please log in submit: Submit
is referenced as login.title, login.submit.
Supported formats
| Extension | Format |
|---|---|
yaml, yml |
YAML |
json |
JSON |
php |
PHP file returning an array |
ini |
INI key=value |
csv |
CSV (key,translation) |
po |
Gettext PO — uses msgid/msgstr |
Changing format priority
By default the order is xlf, yaml, yml, json, php, ini, csv, po.
To override, set:
$GLOBALS['TYPO3_CONF_VARS']['LANG']['format']['priority'] = 'yaml,xlf,json,php,ini,csv,po';
统计信息
- 总下载量: 17
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 8
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2026-03-18