diff --git a/tutorials/assets_pipeline/importing_translations.rst b/tutorials/assets_pipeline/importing_translations.rst index bd6e5a653900..fc4d419409fa 100644 --- a/tutorials/assets_pipeline/importing_translations.rst +++ b/tutorials/assets_pipeline/importing_translations.rst @@ -57,25 +57,26 @@ CSV files must be formatted as follows: +--------+----------+----------+----------+ The "lang" tags must represent a language, which must be one of the :ref:`valid -locales ` supported by the engine. The "KEY" tags must be -unique and represent a string universally (they are usually in +locales ` supported by the engine, or they must start with an underscore (`_`), +which means the related column is served as comment and won't be imported. +The "KEY" tags must be unique and represent a string universally (they are usually in uppercase, to differentiate from other strings). These keys will be replaced at runtime by the matching translated string. Note that the case is important, "KEY1" and "Key1" will be different keys. The top-left cell is ignored and can be left empty or having any content. Here's an example: -+-------+-----------------------+------------------------+------------------------------+ -| keys | en | es | ja | -+=======+=======================+========================+==============================+ -| GREET | Hello, friend! | Hola, amigo! | こんにちは | -+-------+-----------------------+------------------------+------------------------------+ -| ASK | How are you? | Cómo está? | 元気ですか | -+-------+-----------------------+------------------------+------------------------------+ -| BYE | Goodbye | Adiós | さようなら | -+-------+-----------------------+------------------------+------------------------------+ -| QUOTE | "Hello" said the man. | "Hola" dijo el hombre. | 「こんにちは」男は言いました | -+-------+-----------------------+------------------------+------------------------------+ ++-------+-----------------------+------------------------+------------------------------+------------------------------+ +| keys | en | es | ja | _character | ++=======+=======================+========================+==============================+==============================+ +| GREET | Hello, friend! | Hola, amigo! | こんにちは | John | ++-------+-----------------------+------------------------+------------------------------+------------------------------+ +| ASK | How are you? | Cómo está? | 元気ですか | Jade | ++-------+-----------------------+------------------------+------------------------------+------------------------------+ +| BYE | Goodbye | Adiós | さようなら | Nancy | ++-------+-----------------------+------------------------+------------------------------+------------------------------+ +| QUOTE | "Hello" said the man. | "Hola" dijo el hombre. | 「こんにちは」男は言いました | Tian | ++-------+-----------------------+------------------------+------------------------------+------------------------------+ The same example is shown below as a comma-separated plain text file, which should be the result of editing the above in a spreadsheet. @@ -89,11 +90,11 @@ comma in the import options. .. code-block:: none - keys,en,es,ja - GREET,"Hello, friend!","Hola, amigo!",こんにちは - ASK,How are you?,Cómo está?,元気ですか - BYE,Goodbye,Adiós,さようなら - QUOTE,"""Hello"" said the man.","""Hola"" dijo el hombre.",「こんにちは」男は言いました + keys,en,es,ja,_character + GREET,"Hello, friend!","Hola, amigo!",こんにちは,John + ASK,How are you?,Cómo está?,元気ですか,Jade + BYE,Goodbye,Adiós,さようなら,Nancy + QUOTE,"""Hello"" said the man.","""Hola"" dijo el hombre.",「こんにちは」男は言いました,Tian CSV importer ------------