alpinejs-i18n
by @rehhouari
Active 72
Easy i18n (Internationalization) for Alpine.js!
About this project
i18n Plugin for Alpine.js Internationalization (i18n) support for Alpine.js (unofficial) About This plugin allows you to easily use localization in your Alpine.js projects! It provide two magic helpers that you can use to localize strings in your Alpine.js websites & webapps. Compatibility Version ^2.x for Alpine v3. Version 1.0.0 for Alpine v2. Demo Features Easy localization of strings using a magic helper Support variables in strings! Setting & getting current locale using a magic helper as well Automatically update affected components on locale change! Can be easily used outside of Alpine.js components (in Javascript) Typescript support. Installation CDN NPM ES6 Module Add the following to the of your document before including Alpine: Usage 1- Setting up the translations and locale. In Javascript, after importing alpinejs-i18n: 2 - Usage from inside Alpine Components $t magic helper Using the $t magic helper, you can display the translation for the current locale Following the example settings above: This will make the button's text "button". Using variables in strings Using variables in translation strings is easy: This will make the span's text "hello, rafik"!
From the project README on GitHub
- Stars
- 72
- Forks
- 5
- License
- MIT
- Last push
- 1 Apr 2026
Add this badge to your README
Show that your project is listed on Made in Algeria.
[](https://www.madeinalgeria.dev/projects/alpinejs-i18n)