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

.Strings - iOS Strings Resources (Strings)

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

ファイル拡張子 

.strings

API拡張 

strings

インポート 

はい

エクスポート 

はい

複数形のサポート 

いいえ

説明のサポート 

はい

フォーマットオプション 

これらは、ファイルがアップロードおよび/またはダウンロードされる際に指定できるオプションです。アップロード/ダウンロード方法(API、CLI、Repo syncなど)に応じて、クエリパラメータ アップロードダウンロード、または phrase.yml 設定ファイルで指定できます。

convert_placeholder、include_pluralized_keys、multiline_comments

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

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

ファイル形式オプション

識別子 

convert_placeholder

タイプ 

ブール

アップロード 

いいえ

ダウンロード 

はい

デフォルト 

false

概要 

プレースホルダーは、ファイル形式固有の要件に合わせて変換されます。例: $s$@, %s%@

識別子 

include_pluralized_keys

タイプ 

ブール

アップロード 

いいえ

ダウンロード 

はい

デフォルト 

true

概要 

ロケールファイルにStringsの複数形キーも含めます。

識別子 

multiline_comments

タイプ 

ブール

アップロード 

いいえ

ダウンロード 

はい

デフォルト 

false

概要 

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

コードサンプル

"boolean_key" = "--- true\n";
"empty_string_translation" = "";
/* This is the amazing description for this key! */
"key_with_description" = "Check it out!このキーは説明です。(少なくとも一部のファイル形式において)";
"key_with_line-break" = "This translations contains\na line-break.";
"nested.deeply.key" = "Wow, this key is nested even deeper.";
"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.";
"unverified_key" = "この翻訳は未検証であり、検証待ちです。(一部のファイル形式では、このステータスもエクスポートされます)";

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.