支持文件类型 (Strings)

.PROPERTIES - Java Properties (Strings)

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

文件扩展名 

.properties

API 扩展 

属性

导入 

导出 

复数形式支持 

描述支持 

格式选项 

escape_single_quotes

omit_separator_space

crlf_line_terminators

escape_meta_chars

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

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

格式选项

标识符 

escape_single_quotes

类型 

布尔值

上传 

下载 

默认 

true

说明 

用另一个单引号转义单引号(例如,我是 -> 我是)。

标识符 

omit_separator_space

类型 

布尔值

上传 

下载 

默认 

false

说明 

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

标识符 

crlf_line_terminators

类型 

布尔值

上传 

下载 

默认 

false

说明 

使用 CRLF (Windows) 行终止符字符。

标识符 

escape_meta_chars

类型 

布尔值

上传 

下载 

默认 

true

说明 

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

代码示例

boolean_key = --- true\n
empty_string_translation = 
# 这是这个键的惊人描述!
key_with_description = 检查一下\!这键有一个描述\!(至少在某些格式中)
key_with_line-break = 此翻译包含\na 换行符。
nested.deeply.key = 哇,此键嵌套更深。“nested.deeply.key”:“哇,此键嵌套更深。”,
nested.key = 此键嵌套在命名空间内。“nested.key”:“此键嵌套在命名空间内。”,
null_translation = 
pluralized_key.one = 仅找到一个复数。“pluralized_key_one”:“仅找到一个复数。”,
pluralized_key.other = 哇,您有 %s 个复数\!"pluralized_key_other:"哇,您有 %s 个复数!"
pluralized_key.zero = 您没有复数。“pluralized_key.zero”:“您没有小猫。”,
sample_collection = ---\n- 第一项\n- 第二项\n- 第三项\n
simple_key = 只是一个带有简单信息的简单键。“simple_key”:“只是一个带有简单信息的简单键。”,
未验证_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.