DEV Community

Discussion on: Organize your translations using multiple locales files

Collapse
 
goranovs profile image
Samuil Goranov

We use Localeapp.com for a very large Rails project. It has CLI and the workflow is pretty simple, but no matter what tool you use it always comes back to bite you. Rails documentation about locales suggests a very bad approach for locales organization and leads to thousands of dollars in duplicated locales. Also, I wonder how this example especially the model scales.

models:
  pokemon:
   name: Name
   type: Type

If we have many models with type or name attribute it will be duplicated in the locales. Scoping locales by folders/models/controllers/views is not so good idea in my opinion. For example if you have a dropdown menu in your app that has a "delete" button, you should not put the locales in a scoped view path. You will probably have a delete button in hundred places in your app.

Just my few cents on the locales in 7+ years old Rails project with a lot of locales :D