|
文件扩展名 |
.yml, .yaml |
|
API 扩展 |
yml_symfony2 |
|
导入 |
是 |
|
导出 |
是 |
|
复数形式支持 |
是 |
|
描述支持 |
否 |
Symfony 2 是 MVC 架构 PHP Web 开发框架 Symfony 的一个更新。它与前代产品有相似之处,但也是一次完整的重写,提供了 Symfony 不支持的功能。
在 Symfony 2 中,.YAML 主要用作配置文件,但它们也是本地化的推荐文件格式。使用扁平且简单的 .YAML,而不是具有复杂层级订单的 .YAML,因为 Symfony 2 解析器可能无法解释后者。
代码示例
---
boolean_key: true
empty_string_translation: ""
key_with_description,Check it out!This key has a description!(At least in some formats)"
key_with_line-break: |-
此翻译包含
a line-break.
nested:
deeply:
key: "Wow, this key is nested even deeper."
key: This key is nested inside a namespace.
null_translation: ~
pluralized_key:
one: Only one pluralization found.
other: "Wow, you have %s pluralizations!"
zero: You have no pluralization.
sample_collection:
- first item
- second item
- third item
simple_key: Just a simple key with a simple message.
未验证_键: 此翻译尚未经过验证,正在等待验证。(在某些格式中,我们也会导出此状态)