2026-04-24 17:03:31 -04:00
2025-02-25 14:19:24 -07:00
2025-01-11 13:02:00 +01:00
2025-12-25 09:01:33 -07:00
2026-04-24 17:03:31 -04:00
2025-11-12 21:57:04 -05:00
2025-02-25 17:19:06 -05:00
2025-02-14 13:33:07 -07:00
2026-04-21 08:06:23 -06:00
2026-01-13 08:10:02 -07:00
2025-02-04 22:51:52 -05:00
2025-04-16 13:53:28 -06:00
2026-04-03 00:04:40 -04:00

:toc: macro
:toclevels: 5
:figure-caption!:

:trmnl_link: link:https://trmnl.com[TRMNL]
:ror_link: link:https://rubyonrails.org[Ruby on Rails]
:i18n_link: link:https://guides.rubyonrails.org/i18n.html[I18n]

= TRMNL I18n

This is the complete collection of locales for {trmnl_link} internationalization.

toc::[]

== Contributions

Nothing needs to be installed on your computer. No coding is required. Follow link:https://github.com/usetrmnl/localizations/blob/main/GUIDE.md[the guide].

If you want to run the test suite locally, follow the steps below.

== Requirements

. link:https://www.ruby-lang.org[Ruby].
. {ror_link}.
. {trmnl_link}.

== Setup

To install _with_ security, run:

[source,bash]
----
# 💡 Skip this line if you already have the public certificate installed.
gem cert --add <(curl --compressed --location https://trmnl.com/gems.pem)
gem install trmnl-i18n --trust-policy HighSecurity
----

To install _without_ security, run:

[source,bash]
----
gem install trmnl-i18n
----

You can also add the gem directly to your project:

[source,bash]
----
bundle add trmnl-i18n
----

Once the gem is installed, you only need to require it:

[source,ruby]
----
require "trmnl/i18n"
----

If you are using this gem in a non-Rails application, you will need to manually load the locales during the application's initialization.

[source,ruby]
----
TRMNL::I18n.load_locales
----

== Usage

This gem is a {ror_link} Railtie that follows {i18n_link} conventions allowing you to customize country locales. You only need to include this gem, as documented in the xref:_setup[Setup] section, to automatically load and use these locales. That's it!

== Development

To contribute, run:

[source,bash]
----
git clone https://github.com/usetrmnl/trmnl-i18n
cd trmnl-i18n
bin/setup
----

You can also use the IRB console for direct access to all objects:

[source,bash]
----
bin/console
----

To add new locale  keys, first add them to the `en.yml` files in each folder. Then run `bin/sync` to update all other languages. The default source locale is always `en` but you can supply a specific locale if you like. For example, if wanting to use French as the default source locale, run: `bin/sync fr`.

To test within a Rails app for local development purposes, you can do the following:

. Create a feature branch and add your new locales.
. Push the feature branch up (no need to open a code review until you are ready).
. Update your Rails application's `Gemfile` to point to your feature branch. Example: `gem "trmnl-i18n", github: "your_fork/trmnl-i18n", branch: "your_feature_branch"`.

== Tests

To test, run:

[source,bash]
----
bin/rake
----

== Deployment

To publish, first:

. Install link:https://alchemists.io/projects/gemsmith[Gemsmith].
. link:https://alchemists.io/projects/gemsmith#_configuration[Configure] your account.
. Enable link:https://alchemists.io/projects/gemsmith#_security[security].

Once the above is setup, now you can publish by doing the following:

[source,bash]
----
git switch main
git pull
gemsmith --publish
----

That's it!

== Credits

* German via link:https://github.com/ramdacxp[@ramdacxp], link:https://github.com/philippbosch[@philippbosch], link:https://github.com/yannicschuller[@yannicschuller], link:https://github.com/MaxDev98[@MaxDev98], link:https://github.com/IngmarStein[@IngmarStein], link:https://github.com/DavidOrtmann[@DavidOrtmann], link:https://github.com/Wandmalfarbe[@Wandmalfarbe]
* Spanish (Spain) via link:https://github.com/joesfer[@joesfer], link:https://github.com/jeff-foster[@jeff-foster], link:https://github.com/fixmycode[@fixmycode], link:https://github.com/jcorbalanm[@jcorbalanm]
* French via link:https://github.com/theogiraudet[@theogiraudet], link:https://github.com/MarvinNTA[@MarvinNTA]
* Indonesian via link:https://github.com/Adekabang[@Adekabang]
* Icelandic via link:https://github.com/arnib13[@arnib13]
* Italian via link:https://github.com/danieleb-podero[@danieleb-podero], link:https://github.com/Stefifox[@Stefifox]
* Japanese via Hiroyuki Miyoshi, link:https://github.com/liahsheep[@liahsheep]
* Korean via link:https://github.com/i-say-young[@i-say-young], link:https://github.com/yongsk0066[@yongsk0066]
* Polish via link:https://github.com/EbonyBirch[@EbonyBirch]
* Brazilian Portuguese via link:https://github.com/danielsitnik[@danielsitnik]
* Danish via link:https://github.com/clysel[@clysel]
* Dutch via link:https://github.com/huge10[@huge10], link:https://github.com/SjanPjer[@SjanPjer], link:https://github.com/gjdenhertog[@gjdenhertog], link:https://github.com/hufman[@hufman], link:https://github.com/lukasvermeer[@lukasvermeer], link:https://github.com/ExcuseMi[@ExcuseMi]
* Ukrainian via link:https://github.com/veikus[@veikus], link:https://github.com/yankobogdan[@yankobogdan]
* Chinese (Simplified) via link:https://github.com/blueset[@blueset], link:https://github.com/JoshBashed[@JoshBashed], link:https://github.com/MarkSong535[@MarkSong535]
* Chinese (Hong Kong) via link:https://github.com/liahsheep[@liahsheep]
* Hebrew via link:https://github.com/itay99988[@itay99988]
* Russian via link:https://github.com/putnik[@putnik]
* Romanian via link:https://github.com/tomita-militaru[@tomita-militaru]
* Lithuanian via link:https://github.com/kkuzmickas[@kkuzmickas]
* Built with link:https://alchemists.io/projects/gemsmith[Gemsmith].
* Engineered by link:https://trmnl.com[TRMNL].
S
Description
No description provided
Readme MIT 3.9 MiB
Languages
Ruby 97.1%
Dockerfile 2.9%