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

.XML - Javaプロパティ(文字列)

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

ファイル拡張子 

.xml

API拡張 

properties_xml

インポート 

はい

エクスポート 

はい

複数形のサポート 

いいえ

説明のサポート 

はい

JavaプロパティXMLは、JavaプロパティファイルのXMLに相当します。Javaプロパティファイルのキーは、XMLのエントリー要素の属性として存在し、値はエントリータグ内にネストされたインラインテキスト文字列です。標準のJavaプロパティファイルと比較して、XMLタイプはエントリー要素により多くの属性を追加できるため、より高い柔軟性を提供します。たとえば、class='translatable'属性を持つキーのみが翻訳のために選択されるように決定できます。

コードサンプル

<?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">チェックしてみてください!このキーには説明があります!(少なくとも一部のファイル形式で)</entry>
  <entry key="key_with_line-break">この翻訳には
a line-break.</entry>
  <entry key="nested.deeply.key">Wow, this key is nested even deeper.</entry>
  <entry key="nested.key">このキーは名前空間の中にネストされています。</entry>
  <entry key="null_translation"/>
  <entry one="複数形は1つだけ見つかりました。" other="わあ、%s の複数形があります!" zero="複数形はありません。" key="pluralized_key"/>
  <entry key="sample_collection">---
- 最初のアイテム
- 2番目のアイテム
- 3番目のアイテム
</entry>
  <entry key="simple_key">シンプルなキー、シンプルなメッセージ、非常にシンプルです。</entry>
  <entry key="unverified_key">この翻訳はまだ検証されておらず、待機中です。</entry>(一部のフォーマットでは、このステータスもエクスポートされます)</entry>
</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.