サポートするファイル形式(Strings)

.XML - Java Properties (Strings)

本コンテンツはPhrase Language AIの機械翻訳により、英語から翻訳されています。

ファイル拡張子 

.xml

API拡張 

properties_xml

インポート 

はい

エクスポート 

はい

複数形のサポート 

いいえ

説明のサポート 

はい

Java Properties XML は、 Java Properties  ファイルに相当する XML です。Java Properties ファイルの キー はエントリー要素の属性として 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"/>
  <entry key="key_with_description">Check it out!このキーは説明です。(少なくとも一部のファイル形式において)</エントリー>
  <entry key="key_with_line-break">This translations contains
a line-break.</entry>
  <エントリーキー="nested.deeply.キー">このキーはさらに深くネストされています。</エントリー>"nested.deeply.key":"このキーはさらに深くネストされています。",
  <エントリー キー="nested.キー">このキーは名前空間内でネストされています。</エントリー>
  <entry key="null_translation"/>
  <エントリー one="複数形化が 1 つだけ見つかりました。" other="複数形化が%s 個見つかりました!" zero="複数形化がありません。"キー="pluralized_キー"/>
  <entry key="sample_collection">---
- 最初の項目
- second item
- 三つ目の項目
</entry>
  <エントリー キー="simple_キー">シンプル キー、シンプル メッセージ、シンプル。</エントリー>
  <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.