Exporting translations

Export the locale's pairs in the provided format. Available formats: keyvaluejson, po, strings, properties, xmlproperties, android, php, xlsx, yaml and csv.

Endpoint:

GET /projects/:projectId/locales/:localeIdent/export/:exportFormat

The response Content-Type for this action is application/octet-stream.

Available formats

Apple Strings

Identifier: strings

Example:

GET /projects/:projectId/locales/:localeIdent/export/strings

Response

// Filename: en_US.strings

"menu.start.button" = "Start Game";
"menu.welcome.label" = "Welcome! To start a new game, press the 'A' button.";
"menu.options.button" = "Game Options";
"menu.share.facebook" = "Share on Facebook!";
"screens.gameover.title" = "Gameover, better luck next time!";

Android XML

Identifier: android

Example:

GET /projects/:projectId/locales/:localeIdent/export/android

Response

// Filename: en_US.xml

<?xml version="1.0" encoding="UTF-8"?>
<resources>
  <string name="menu.start.button">Start Game</string>
  <string name="menu.welcome.label">Welcome! To start a new game, press the &#39;A&#39; button.</string>
  <string name="menu.options.button">Game Options</string>
  <string name="menu.share.facebook">Share on Facebook!</string>
  <string name="screens.gameover.title">Gameover, better luck next time!</string>
</resources>

CSV

Identifier: csv

Example:

GET /projects/:projectId/locales/:localeIdent/export/csv

Response

// Filename: en_US.csv

screens.gameover.title,"Gameover, better luck next time!"
menu.start.button,Start Game
menu.welcome.label,"Welcome! To start a new game, press the 'A' button."
menu.options.button,Game Options
menu.share.facebook,Share on Facebook!

Gettext

Identifier: po

Example:

GET /projects/:projectId/locales/:localeIdent/export/po

Response

// Filename: en_US.po

msgid ""
msgstr ""
"MIME-Version: 1.0"
"Content-Type: text/plain; charset=UTF-8"
"Content-Transfer-Encoding: 8bit"
"Language: en_US"

msgid "menu.options.button"
msgstr "Game Options"

msgid "menu.share.facebook"
msgstr "Share on Facebook!"

msgid "screens.gameover.title"
msgstr "Gameover, better luck next time!"

msgid "menu.start.button"
msgstr "Start Game"

msgid "menu.welcome.label"
msgstr "Welcome! To start a new game, press the 'A' button."

Key Value JSON

Identifier: keyvaluejson

Example:

GET /projects/:projectId/locales/:localeIdent/export/keyvaluejson

Response

// Filename: en_US.json

{
    "menu.options.button": "Game Options",
    "menu.share.facebook": "Share on Facebook!",
    "menu.start.button": "Start Game",
    "menu.welcome.label": "Welcome! To start a new game, press the 'A' button.",
    "screens.gameover.title": "Gameover, better luck next time!"
}

Java Properties

Identifier: properties

Example:

GET /projects/:projectId/locales/:localeIdent/export/properties

Response

// Filename: en_US.properties

menu.start.button = Start Game
menu.welcome.label = Welcome! To start a new game, press the 'A' button.
menu.options.button = Game Options
menu.share.facebook = Share on Facebook!
screens.gameover.title = Gameover, better luck next time!

Java XML

Identifier: xmlproperties

Example:

GET /projects/:projectId/locales/:localeIdent/export/xmlproperties

Response

// Filename: en_US.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM "[http://java.sun.com/dtd/properties.dtd](http://java.sun.com/dtd/properties.dtd)">
<properties>
  <entry key="screens.gameover.title">Gameover, better luck next time!</entry>
  <entry key="menu.start.button">Start Game</entry>
  <entry key="menu.welcome.label">Welcome! To start a new game, press the &#39;A&#39; button.</entry>
  <entry key="menu.options.button">Game Options</entry>
  <entry key="menu.share.facebook">Share on Facebook!</entry>
</properties>

Microsoft Excel

Identifier: xlsx

Example:

GET /projects/:projectId/locales/:localeIdent/export/xlsx

Response

// Filename: en_US.xlsx

// File contents cannot be displayed over a text editor because of their encoding.
// Open it on Excel :)

PHP

Identifier: php

Example:

GET /projects/:projectId/locales/:localeIdent/export/php

Response

// Filename: en_US.php

<?php
$en_US = array(
    "menu.start.button" => "Start Game",
    "menu.welcome.label" => "Welcome! To start a new game, press the 'A' button.",
    "menu.options.button" => "Game Options",
    "menu.share.facebook" => "Share on Facebook!",
    "screens.gameover.title" => "Gameover, better luck next time!"
);>

YAML

Identifier: yaml

Example:

GET /projects/:projectId/locales/:localeIdent/export/yaml

Response

// Filename: en_US.yaml

en_US:
  menu:
    start:
      button: Start Game
    welcome:
      label: Welcome! To start a new game, press the 'A' button.
    options:
      button: Game Options
    share:
      facebook: Share on Facebook!
  screens:
    gameover:
      title: Gameover, better luck next time!

results matching ""

    No results matching ""