支持文件类型 (Strings)

.PROPERTIES - Java Properties (字符串)

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

文件扩展名 

.properties

API 扩展 

properties

导入 

导出 

复数形式支持 

描述支持 

格式选项 

这些选项可以在上传和/或下载文件时指定。根据上传/下载方法(API、CLI、Repo 同步等),它们可以在查询参数 上传下载phrase.yml 配置文件中指定。

escape_single_quotes

omit_separator_space

crlf_line_terminators

escape_meta_chars

Java Properties 是通常由 Java 使用的标准配置/本地化文件。此文件格式包含由 = 符号连接的键值对。除此之外,它没有任何其他级联元素。文件中的 将始终被解析为字符串类型。

复制键(文件包含两个或多个相同的键)不应有问题,但稍后在流程中加载的值将覆盖先前的数据。准备翻译文件时,请通过将属性文件放入 Java IDE(例如 Eclipse、IntelliJ)中来检查是否存在复制键,以便识别它们。

格式选项

标识符 

escape_single_quotes

类型 

布尔值

上传 

下载 

默认 

true

说明 

使用另一个单引号转义单引号(例如 I'm -> I''m )。

标识符 

omit_separator_space

类型 

布尔值

上传 

下载 

默认 

false

说明 

跳过分隔符(= )前后的空间。

标识符 

crlf_line_terminators

类型 

布尔值

上传 

下载 

默认 

false

说明 

使用 CRLF (Windows) 行终止符。

标识符 

escape_meta_chars

类型 

布尔值

上传 

下载 

默认 

true

说明 

使用反斜杠转义元字符 (:=!#)

代码示例

boolean_key = --- true\n
empty_string_translation = 
# 这是此键的精彩描述!
key_with_description = Check it out\!This key has a description\!(At least in some formats)
key_with_line-break = This translations contains\na line-break.
nested.deeply.key = 哇,这个键嵌套得更深。
nested.key = 这个键嵌套在命名空间内。
null_translation = 
pluralized_key.one = 仅找到一个复数形式。
pluralized_key.other = 哇,你有 %s 个复数形式!
pluralized_key.zero = 你没有任何复数形式。
sample_collection = ---\n- 第一条目\n- 第二条目\n- 第三条目\n
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.