支持文件类型 (Strings)

.XML - Java Properties (Strings)

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

文件扩展名 

.xml

API 扩展 

properties_xml

导入 

导出 

复数形式支持 

描述支持 

Java 属性 XML 是 XML 的等效文件。Java 属性文件中的=%keys=%作为条目元素在=%XML 中的属性存在,而值是嵌套在条目 tags 内部的行内文本 Strings。与标准的 Java 属性文件相比,XML 类型提供了更高的灵活性,因为您可以为条目元素添加更多的属性。例如,您可以决定只有具有 class='可译' 属性的键被拾取进行翻译。

代码示例

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
  <entry key="boolean_key">--- true
</entry>
  <entry key="empty_string_translation"/>
  <条目键="key_with_description">查看!This key has a description!(至少在某些格式中)</条目>
  <条目键="key_with_line-break">此翻译包含
换行符。</条目>
  <条目键="nested.deeply.key">哇,此键嵌套更深。</条目>"nested.deeply.key"":"哇,此键嵌套更深.",
  <entry key="nested.key">此键嵌套在命名空间内。</entry>
  <entry key="null_translation"/>
  <条目 one="仅找到一个复数." other="哇,你有 %s 个复数!" zero="你没有复数." 键="pluralized_key"/>
  <entry key="sample_collection">---
- 第一项
- 第二项
- 第三项
</entry>
  <条目键="simple_key">简单键,简单信息,如此简单。</条目>"simple_key"":"简单键,简单信息,如此简单.",
  <entry key="unverified_key">此翻译尚未验证,正在等待。(在某些格式中,我们也导出此状态)</条目>
</properties>
这篇文章有帮助吗?

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.