支持文件类型 (Strings)

.YAML - Ruby on Rails (字符串)

文本由 Phrase Language AI 从英语机器翻译而得。

文件扩展名

.yml, .yaml

API 扩展

yml

导入

是

导出

是

复数形式支持

是

描述支持

否

Ruby on Rails 是一个开源框架,旨在简化使用 Ruby 编程语言开发 Web 应用程序的过程。Ruby on Rails 内置了一个本地化模块,使用 .YAML 作为标准格式(以及 RB)。

在翻译之前,请对 .YAML 文件进行完整性检查,确保其符合所有 .YAML 约定,例如基于缩进的数据嵌套。

如果文件包含数组格式的键,编辑器会将翻译显示为字符串。确保译员不会更改语法,因为该键类型没有内容验证。可以在键设置中将键类型更改为数组,以自动将其从翻译订单中排除。

Rails i18n 指南

代码示例

---
英语:
  boolean_key: true
  empty_string_translation: ''
  key_with_description: Check it out!This key has a description!(至少在某些
    格式中)
  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: 仅找到一个复数形式。
    other: 哇,你有 %s 个复数形式!
    zero: 你没有任何复数形式。
  sample_collection:
  - first item
  - second item
  - third item
  simple_key: 只是一个带有简单消息的简单键。
  unverified_key: 此翻译尚未验证,正在等待验证。(在某些
    格式中,我们也会导出此状态)
这篇文章有帮助吗?
★ ★ ★ ★ ★

Sorry about that! In what way was it not helpful?

The article didn’t address my problem.
I couldn’t understand the article.
The feature doesn’t do what I need.
Other reason.

Note that feedback is provided anonymously so we aren't able to reply to questions.
If you'd like to ask a question, submit a request to our Support team.
Thank you for your feedback.