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

.XLIFF - Symfony (Strings)

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

ファイル拡張子 

.xlf、.xliff

API拡張 

symfony_xliff

インポート 

はい

エクスポート 

はい

複数形のサポート 

いいえ

説明のサポート 

はい

フォーマットオプション 

enclose_in_cdata

include_translation_state

Symfony は、さまざまな事前定義のPHPコンポーネントで構成される高パフォーマンスPHPフレームワークです。 Symfony で構築されたアプリケーションのローカライゼーションは、 .XLIFF、 .YAML、 PHP 配列などのファイル形式で行うことができます。 

Symfony の .XLIFF と標準の .XLIFF の違いは、それぞれの <trans-unit> が表すものの場所にあることです。標準の.XLIFF(および他のフレームワークでサポートされているほとんどの.XLIFFバリエーション)はID属性を使用しますが、Symfony .XLIFFは属性を識別子として使用します。

Strings が正しいロケールにアップロードされるように、Symfony .XLIFF のファイルヘッダーの 訳文言語 属性は、関連プロジェクトで設定された ロケール名 と一致する必要があります。

ファイル形式オプション

識別子 

enclose_in_cdata

タイプ 

ブール

アップロード 

いいえ

ダウンロード 

はい

デフォルト 

false

概要 

CDATA で HTML tags を含む翻訳を囲みます。無効にした場合、サポートしていないHTML実体はデコードされた値に置き換えられます。以下に例を挙げます。

  • &pound;£ に置き換えられます。

  • &trade; に置き換えられます。

識別子 

include_translation_state

タイプ 

ブール

アップロード 

いいえ

ダウンロード 

はい

デフォルト 

false

概要 

翻訳の状態を訳文ロケールに含める。すべての <訳文> タグには状態属性が付与されます。状態属性は、新規サインオフ翻訳済みのいずれかです。

コードサンプル

<?xml version="1.0" encoding="UTF-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
  <file original="global" datatype="plaintext" source-language="de-DE" target-language="en-GB">
    <body>
      <trans-unit id="boolean_key" resname="boolean_key">
        <source xml:lang="de-DE">--- true
</source>
        <target xml:lang="en-GB">--- true
</target>
      </trans-unit>
      <trans-unit id="empty_string_translation" resname="empty_string_translation">
        <source xml:lang="de-DE"/>
        <target xml:lang="en-GB"/>
      </trans-unit>
      <trans-unit id="key_with_description" resname="key_with_description">
        <source xml:lang="de-DE">Schau dir das mal an!Dieser Schlüssel hat eine Beschreibung!</原文>
        <target xml:lang="en-GB">Check it out!このキーは説明です。(少なくとも一部のファイル形式において)</訳文>
        <note>私はこのキーにとって非常に重要な説明です!</note>
      </trans-unit>
      <trans-unit id="key_with_line-break" resname="key_with_line-break">
        <source xml:lang="de-DE">Diese Übersetzung hat
einen Zeilenumbruch.</原文>
        <target xml:lang="en-GB">This translations contains
a line-break.</target>
      </trans-unit>
      <trans-unit id="nested.deeply.key" resname="nested.deeply.key">
        <source xml:lang="de-DE">Ich bin ein tief verschachtelter Schlüssel</source>
        <訳文 xml:lang="en-GB">私は深くネストされたキーです。</訳文>
      </trans-unit>
      <trans-unit id="nested.key" resname="nested.key">
        <source xml:lang="de-DE">Dieser Schlüssel ist innerhalb eines Namensraumes verschachtelt.</source>
        <訳文 xml:lang="en-GB">このキーは名前空間内でネストされています。</訳文>
      </trans-unit>
      <trans-unit id="null_translation" resname="null_translation">
        <source xml:lang="de-DE"/>
        <target xml:lang="en-GB"/>
      </trans-unit>
      <trans-unit id="sample_collection" resname="sample_collection">
        <source xml:lang="de-DE">---
- エルステスアイテム
- 個のアイテム
</source>
        <target xml:lang="en-GB">---
- 最初の項目
- second item
- 三つ目の項目
</target>
      </trans-unit>
      <trans-unit id="simple_key" resname="simple_key">
        <source xml:lang="de-DE">Nur ein einfacher Schlüssel mit einer einfachen Nachricht.</source>
        <訳文 xml:lang="en-GB">シンプルなメッセージが入ったシンプルなキーです。</訳文>
      </trans-unit>
      <trans-unit id="unverified_key" resname="unverified_key">
        <source xml:lang="de-DE">Diese Übersetzung ist noch nicht bestätigt und wartet drauf!</source>
        <訳文 xml:lang="en-GB">この翻訳は検証済みではなく、待機中です。(一部のファイル形式では、このステータスもエクスポートされます)</訳文>
      </trans-unit>
    </body>
  </file>
</xliff>
この記事は役に立ちましたか?

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.