Logo

dev-resources.site

for different kinds of informations.

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

Published at
11/16/2024
Categories
i18n
translations
tooling
webdev
Author
intrepidd
Categories
4 categories in total
i18n
open
translations
open
tooling
open
webdev
open
Author
9 person written this
intrepidd
open
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.

i18n Article's
30 articles in total
Favicon
Integration for FormatJS/react-intl: Automated Translations with doloc
Favicon
Introducing date-formatter-i18n: Simplify i18n for Dates in JavaScript
Favicon
Implementing i18n in Next.js - A Complete Guide to next-intl with App Router
Favicon
Integration for Angular: Automated Translations with doloc
Favicon
I18n vue
Favicon
Automating i18n Localization with AI: The Prismy Approach
Favicon
Integrating and storing the selected user language into the database in a full-stack application on "Angular" and "NestJS"
Favicon
🎄 Instant Local Translation with Chrome 🌐
Favicon
ICU vs. i18next: Choosing the Right Format for Your Localization Needs
Favicon
LiveCodes Gets a Fresh Look, and Goes Multilingual!
Favicon
A Modern Approach to Software Localization (2024)
Favicon
Pseudolocalization in Phoenix with gettext_pseudolocalize
Favicon
Launching YAMLFish, a simple translations management tool
Favicon
Mastering RTL with One Line of CSS (No Libraries Needed!) 🚀
Favicon
Auto-Detect RTL in React with TypeScript! 🌐
Favicon
Is Your CSS Logical?
Favicon
Automation and branches- Using YAMLFish to easily manage I18n translations in your project
Favicon
The basics - Using YAMLFish to easily manage I18n translations in your project
Favicon
App Localization with doloc
Favicon
Software Localization Checklist
Favicon
Maneira simples de adicionar suporte a i18n no Rust com exemplos e testes
Favicon
Manera simple de agregar soporte i18n en Rust con ejemplos y pruebas
Favicon
Simple way to make i18n support in Rust with with examples and tests
Favicon
Reliable date formatting in Next.js
Favicon
Even a mouse can do i18n
Favicon
A Simple Way to Handle Locale-Specific URLs in Express
Favicon
Wagtail programmatically create page translation
Favicon
I18n Localization for Nuxt.js ! Implement multi-language support to website.
Favicon
Simplify Localization
Favicon
Comparing Language Detection Libraries (& API) Using Java/ColdFusion/CFML

Featured ones: