Stop managing translations manually and elevate your project's internationalization effortlessly. With Globetrotter, you can expand the language support of your project from one to over 40 with just one line of NPM configuration.
npm
or yarn
.
NPM:
npm install @airjam/globetrotterOr yarn
yarn add @airjam/globetrotterThis will enable Globetrotter CLI throughout your project. Next, add Globetrotter as an NPM command by adding following line under the
scripts
section in package.json
file.
"globe": "globetrotter load-json [directory_to_locale_files] [options]",The directory is where your locale files are stored. For additional CLI configurations, please refer to the Arguments section in the installation guide. You can also trigger Globetrotter during your project's main build process by appending
&& npm run globe
or && yarn globe
command to the end of the build
command."
"scripts": { "build": "yarn build && yarn globe" }Please note that Globetrotter may take several minutes to run initially.
en-US
and en-UK
will yield the same result.--keep_existing_translations
option to instruct GlobeTrotter to use your custom translations instead. Globetrotter+ users have access to Globetrotter Dashboard where your team can add / edit translation overrides in a realtime without having to touch the actual JSON files.--keep_existing_translations
flag, Globetrotter will not attempt to update existing translations for translation texts in the target locales even if the text for the originating locale has changed. If you'd like to avoid this behavior, you can either remove existing translations from the destination locales or create a new translation ID and text from the originating locale whenever you are updating texts.--keep_existing_translations flag
to your CLI arguments.