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

.STRINGS - iOS Strings Resources (Strings)

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

ファイル拡張子 

.strings

API拡張 

strings

インポート 

はい

エクスポート 

はい

複数形のサポート 

いいえ

説明のサポート 

はい

フォーマットオプション 

convert_placeholder, include_pluralized_keys, multiline_comments

Strings リソースファイルは、iOS および OS X アプリケーションで使用される標準のローカライゼーションファイルです。Strings リソース ファイルは、= 記号で接続されたキーと値のペアで構成されます。Java Properties ファイルと似ていますが、キーと値の両方が二重引用符で囲まれ、それぞれのキーと値のペアがセミコロンで終わる点が異なります。

Strings リソースファイルをサードパーティのツール (genstrings など) を使用して生成する場合、複製キー Strings を持つファイルがある可能性があります。複製キーは通常は問題になりませんが、翻訳プロセスを開始する前に削除することをお勧めします。

ファイル形式オプション

識別子 

convert_placeholder

タイプ 

ブール

アップロード 

いいえ

ダウンロード 

はい

デフォルト 

false

概要 

ファイル形式に固有な要求に適合するために、プレースホルダーが変換されます。例:$s$@%s%@

識別子 

include_pluralized_keys

タイプ 

ブール

アップロード 

いいえ

ダウンロード 

はい

デフォルト 

true

概要 

ロケールファイルに複数化されたキーも含めます。

識別子 

multiline_comments

タイプ 

ブール

アップロード 

いいえ

ダウンロード 

はい

デフォルト 

false

概要 

有効にすると、複数行のコメントが .Strings ファイル内でレンダリングされます。

コードサンプル

"boolean_key" = "--- true\n";
"empty_string_translation" = "";
/* このキーの素晴らしい説明です! */
"key_with_description" = "Check it out!このキーは説明です。(少なくとも一部のファイル形式において)";
"key_with_line-break" = "This translations contains\na line-break.";
"nested.deeply.キー" = "このキーはさらに深くネストされています。";"nested.deeply.キー":"このキーはさらに深くネストされています。",
"nested.key" = "This key is nested inside a namespace.";
"null_translation" = "";
"pluralized_key.one" = "Only one pluralization found.";
"pluralized_key.other" = "Wow, you have%s pluralizations!";
"pluralized_key.zero" = "You have no pluralization.";
"sample_collection" = "---\n- first item\n- second item\n- third item\n";
"simple_key" = "Just a simple key with a simple message.";
"未検証_key" = "この翻訳はまだ検証済みではなく、待機しています。"(一部のファイル形式では、このステータスもエクスポートされます)";

Plurals for iOS Localizable Strings

複数の値を指定する場合は、次の後置演算子を追加します。

"messages.zero" = "No messages received";
"messages.one" = "One message received";
"messages.other" = "%s messages received";
この記事は役に立ちましたか?

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.