Skip to content

Docs / Get started

Pick your stack

Find your framework and copy the format id and the init command that set verbatra up for it, along with the usual locale file layout.

Find your framework below and use its init command in place of the one in the Quickstart. Each file layout is the pattern init writes when it finds no locale files; when your files already exist, init detects where they are, and --path sets the pattern yourself. Every format's full behavior is on Formats. Some stacks also have a step-by-step quickstart, linked at the end of their section.

React with i18next

For i18next, react-i18next, and next-i18next projects.

  • Format: i18next-json
  • Files: locales/{locale}.json
npx @verbatra/cli init --format i18next-json --provider gemini --yes

Details: The four JSON formats.

Step by step: React quickstart.

Next.js with next-intl

For next-intl message files, whose values are ICU messages.

  • Format: next-intl-json
  • Files: messages/{locale}.json
npx @verbatra/cli init --format next-intl-json --provider gemini --yes

Details: The four JSON formats.

Step by step: Next.js quickstart.

Vue and Nuxt with vue-i18n

For vue-i18n, including Nuxt I18n, with single-brace placeholders and pipe plurals.

  • Format: vue-i18n-json
  • Files: src/locales/{locale}.json
npx @verbatra/cli init --format vue-i18n-json --provider gemini --yes

Details: The four JSON formats.

Step by step: Vue quickstart.

Angular with ngx-translate

For ngx-translate JSON, flat or nested.

  • Format: ngx-translate-json
  • Files: src/assets/i18n/{locale}.json
npx @verbatra/cli init --format ngx-translate-json --provider gemini --yes

Details: The four JSON formats.

Step by step: Angular quickstart.

Flutter

For Flutter's Application Resource Bundles. init also sets localeStyle: "posix", so pt-BR is written as app_pt_BR.arb, the name flutter gen-l10n reads.

  • Format: arb
  • Files: lib/l10n/app_{locale}.arb
npx @verbatra/cli init --format arb --provider gemini --yes

Details: ARB.

Step by step: Flutter quickstart.

Android

For strings.xml resources. init also sets localeStyle: "android", so the token expands to values for the source and values-de for German.

  • Format: android-xml
  • Files: app/src/main/res/{locale}/strings.xml
npx @verbatra/cli init --format android-xml --provider gemini --yes

Details: Android strings.xml.

iOS and macOS

Two formats, depending on how your project stores its strings. For .strings files with their .stringsdict plurals:

  • Format: apple-strings
  • Files: {locale}.lproj/Localizable.strings
npx @verbatra/cli init --format apple-strings --provider gemini --yes

For an Xcode String Catalog, one file that holds every locale. Create the catalog in Xcode first: verbatra writes into it but never creates it.

  • Format: apple-xcstrings
  • Files: {locale}Localizable.xcstrings

The pattern needs the {locale} token, but for a String Catalog it expands to nothing: every locale reads and writes the one file Localizable.xcstrings.

npx @verbatra/cli init --format apple-xcstrings --provider gemini --yes

Details: Apple .strings and Xcode String Catalogs.

gettext

For .po catalogs and their .pot templates, as used by Python, PHP, and C projects. init also sets localeStyle: "posix", so pt-BR is written as pt_BR.

  • Format: gettext-po
  • Files: locales/{locale}/LC_MESSAGES/messages.po
npx @verbatra/cli init --format gettext-po --provider gemini --yes

Details: gettext .po/.pot.

Java and Spring

For .properties message bundles. init also sets localeStyle: "posix", so pt-BR is written as messages_pt_BR.properties.

  • Format: properties
  • Files: src/main/resources/messages_{locale}.properties
npx @verbatra/cli init --format properties --provider gemini --yes

Details: Properties.

.NET

For .resx resource files. Images, icons, and designer entries are left untouched.

  • Format: resx
  • Files: Resources/Strings.{locale}.resx
npx @verbatra/cli init --format resx --provider gemini --yes

Details: .NET .resx.

YAML

For nested YAML locale files with i18next-style {{double-brace}} placeholders.

  • Format: yaml
  • Files: locales/{locale}.yml
npx @verbatra/cli init --format yaml --provider gemini --yes

Details: YAML.

XLIFF

For XLIFF 1.2 and 2.0 documents from Angular's ng extract-i18n, a CAT tool, or an agency.

  • Format: xliff
  • Files: locales/{locale}.xlf
npx @verbatra/cli init --format xliff --provider gemini --yes

Details: XLIFF.

INI

For classic INI files, with one level of [section] headers.

  • Format: ini
  • Files: locales/{locale}.ini
npx @verbatra/cli init --format ini --provider gemini --yes

Details: INI.

Something else

A format verbatra does not ship can still be translated through an adapter you write yourself. See Write a custom format adapter.

Edit on GitHub

On this page