https://github.com/11ways/alchemy-i18n
The internationalization plugin for Alchemy
https://github.com/11ways/alchemy-i18n
Last synced: 3 months ago
JSON representation
The internationalization plugin for Alchemy
- Host: GitHub
- URL: https://github.com/11ways/alchemy-i18n
- Owner: 11ways
- License: mit
- Created: 2015-06-22T10:38:35.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2024-02-25T16:09:04.000Z (over 1 year ago)
- Last Synced: 2025-03-09T00:33:16.590Z (3 months ago)
- Language: JavaScript
- Size: 110 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Alchemy i18n
The i18n plugin for the Alchemy MVC
## Installation
Just installing the npm package can be done like this:
$ npm install alchemy-i18n
## Activate
You can activate the plugin by adding this to the main `bootstrap.js` file:
```javascript
alchemy.usePlugin('i18n');
```## Use
This plugin will add a global `__` function you can use to create translatable string objects.
Here's an example on how to use them in your Hawkejs templates:
```ejs
```This would result in the following HTML, when the user requests the page with an English locale:
```ejs
```