Skip to main content
Stringhive Exporting

Exporting

Pull your finished translations out of Stringhive and into your app. You can export from the UI or the API.

From the UI

In your Hive view, click Export. Choose:

  • Locale: export a single locale, or all locales at once
  • Format: choose from any of the supported formats below
  • Scope by tag: optionally limit the export to strings that carry a specific tag (see Tags)

Click Export and the file downloads immediately.

If a tag filter is already active in the string list when you open the export dialog, that tag is pre-selected automatically.

Export formats

JSON gives you flat key-value pairs:

{
  "nav.home": "Home",
  "nav.settings": "Settings",
  "auth.login": "Log in"
}

PHP gives you Laravel-style arrays, one file per source file:

<?php

return [
    'home' => 'Home',
    'settings' => 'Settings',
];

YAML gives you a flat key-value mapping:

nav.home: Home
nav.settings: Settings
auth.login: Log in

CSV gives you a two-column file with a header row:

key,value
nav.home,Home
nav.settings,Settings

PO / Gettext gives you a standard .po file with msgid/msgstr pairs. The string key is used as msgid:

msgid "nav.home"
msgstr "Home"

XLIFF gives you an XLIFF 1.2 file with both <source> and <target> elements, suitable for professional CAT tools:

<trans-unit id="nav.home">
  <source>Home</source>
  <target>Startseite</target>
</trans-unit>

iOS .strings gives you Apple's localization format:

"nav.home" = "Home";
"nav.settings" = "Settings";

Android XML gives you Android's resource format:

<resources>
    <string name="nav_home">Home</string>
    <string name="nav_settings">Settings</string>
</resources>

Custom locale codes in filenames

If you've set a custom locale code for a locale (e.g. de-CH for German Switzerland), the export uses your custom code in filenames. So instead of de.json, you'll get de-CH.json.

Exporting all locales

Selecting "All locales" in the export dialog exports every locale that has at least one translation. The download is a zip file containing one file per locale.

Via the API

# Export all locales as JSON
curl "https://www.stringhive.com/api/hives/my-app/export" \
  -H "Authorization: Bearer YOUR_TOKEN"

# Export a single locale
curl "https://www.stringhive.com/api/hives/my-app/export?locale=de" \
  -H "Authorization: Bearer YOUR_TOKEN"

# Export as YAML
curl "https://www.stringhive.com/api/hives/my-app/export?format=yaml" \
  -H "Authorization: Bearer YOUR_TOKEN"

# Export as PO
curl "https://www.stringhive.com/api/hives/my-app/export?format=po" \
  -H "Authorization: Bearer YOUR_TOKEN"

See API: Translations for the full response shape.