支持文件类型 (Strings)

.YAML - Ruby on Rails (Strings)

文本由 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:看看这个!This key has a description!(至少在某些
    格式)
  key_with_line-break: |-
    此翻译包含
    换行。
  嵌套:
    深入:
      键:哇,这个键嵌套得更深。
    键:这个键嵌套在一个命名空间中。
  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.