DEV Community

Cover image for The basics - Using YAMLFish to easily manage I18n translations in your project
Adrien.S
Adrien.S

Posted on • Edited on

1 1

The basics - Using YAMLFish to easily manage I18n translations in your project

Translations management is never easy, without the proper tools, it can become tedious to work on translation keys, especially when involving non technical people in the process. Existing tools are very pricey and often very complex, making developers dread working on translations.

YAMLFish aims to help software teams managing their translations in a simple and cheap way.

In this series we'll learn how to use YAMLfish and how to implement basic use-cases. In this first article, we'll learn about the basics of the push and pull commands.

Setting-up

First, let's create a free account and create our first project and locales. For this demonstration, we'll assume our main locale is en and we want to translate our app in fr.

YAMLFish projects

Next, let's install the YAMLFish CLI and add the configuration file.

The CLI is a ruby gem, so you'll need ruby installed first.

gem install --pre yamlfish
Enter fullscreen mode Exit fullscreen mode

We need to save a YAMLFish config file .yamlfish.yml at the root of our project. The project token and API key can be found in the footer of the project page on the YAMLFish dashboard :

project_token: some-token
api_key: some-api-key
Enter fullscreen mode Exit fullscreen mode

By default, YAMLFish will look for translations in config/locales, you can override this with the locales_path config key (see the docs).

Pushing existing translations

Pushing our existing translations is as simple as

yamlfish push en
yamlfish push fr
Enter fullscreen mode Exit fullscreen mode

YAMLFish push

And our keys are now available on YAMLFish

YAMLFish dashboard

Retrieving updated translations

Let's assume the fr keys have been updated on YAMLFish by a translator, it's now time to retrieve them into our codebase.

yamlfish pull fr
Enter fullscreen mode Exit fullscreen mode

YAMLFish pull

This will download all fr keys and store them into config/locales/fr.yml

Conclusion

We've learned how to push and pull keys from YAMLFish, allowing non developers to update our translation keys.

In the next articles, we'll learn about how to integrate YAMLFish into the day-to-day of our project, and avoid any conflicts, thanks to branches.

Build gen AI apps that run anywhere with MongoDB Atlas

Build gen AI apps that run anywhere with MongoDB Atlas

MongoDB Atlas bundles vector search and a flexible document model so developers can build, scale, and run gen AI apps without juggling multiple databases. From LLM to semantic search, Atlas streamlines AI architecture. Start free today.

Start Free

Top comments (0)

Scale globally with MongoDB Atlas. Try free.

Scale globally with MongoDB Atlas. Try free.

MongoDB Atlas is the global, multi-cloud database for modern apps trusted by developers and enterprises to build, scale, and run cutting-edge applications, with automated scaling, built-in security, and 125+ cloud regions.

Learn More

👋 Kindness is contagious

Embark on this engaging article, highly regarded by the DEV Community. Whether you're a newcomer or a seasoned pro, your contributions help us grow together.

A heartfelt "thank you" can make someone’s day—drop your kudos below!

On DEV, sharing insights ignites innovation and strengthens our bonds. If this post resonated with you, a quick note of appreciation goes a long way.

Get Started