Download the PHP package ride/web-i18n-expose without Composer
On this page you can find all versions of the php package ride/web-i18n-expose. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ride/web-i18n-expose
More information about ride/web-i18n-expose
Files in ride/web-i18n-expose
Package web-i18n-expose
Short Description Ride module to expose the i18n translator to javascript
License MIT
Informations about the package web-i18n-expose
Ride: Web Expose I18n
Ride module to expose the i18n translator to javascript.
How It Works?
When this module is installed, the translator.js will be added to your HTML views. This will make the Ride translator object available in Javascript. You can request translations from it through the translate method. Once all your translations are requested, you will have to submit the keys through the submitTranslationKeys. Those keys will be included in the view from then on in the following requests.
Code Sample
You can translate a string in javascript with the following function:
Once all translations are requested, you need to submit these keys to make them available in the following requests:
Related Modules
- ride/app
- ride/app-i18n
- ride/lib-config
- ride/lib-event
- ride/lib-mvc
- ride/lib-http
- ride/lib-i18n
- ride/web
- ride/web-i18n
Installation
You can use Composer to install this application.
All versions of web-i18n-expose with dependencies
ride/app-i18n Version ^1.0.0
ride/lib-config Version ^1.0.0
ride/lib-event Version ^1.0.0
ride/lib-mvc Version ^1.0.0
ride/lib-i18n Version ^1.0.0
ride/web Version ^1.0.0
ride/web-i18n Version ^1.0.0