2017 © Pedro Peláez
 

library web-i18n-expose

Ride module to expose the i18n translator to javascript

image

ride/web-i18n-expose

Ride module to expose the i18n translator to javascript

  • Wednesday, March 28, 2018
  • by ride-user
  • Repository
  • 11 Watchers
  • 0 Stars
  • 2,328 Installations
  • PHP
  • 3 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 3 % Grown

The README.md

Ride: Web Expose I18n

Ride module to expose the i18n translator to javascript., (*1)

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., (*2)

Code Sample

You can translate a string in javascript with the following function:, (*3)

rideApp.translator.translate('button.save');
rideApp.translator.translate('success.data.saved', {data: "Sme"});

Once all translations are requested, you need to submit these keys to make them available in the following requests:, (*4)

rideApp.translator.submitTranslationKeys();

Installation

You can use Composer to install this application., (*5)

composer require ride/web-i18n-expose

The Versions

28/03 2018
28/03 2018
28/03 2018
02/05 2017
23/04 2017

dev-vanilla-javascript

dev-vanilla-javascript

Ride module to expose the i18n translator to javascript

  Sources   Download

MIT

The Requires

 

by Joris Vandeweerd

14/10 2016
10/03 2016

0.1.2

0.1.2.0

Ride module to expose the i18n translator to javascript

  Sources   Download

MIT

The Requires

 

by Joris Vandeweerd

21/04 2015

0.1.1

0.1.1.0

Ride module to expose the i18n translator to javascript

  Sources   Download

MIT

The Requires

 

by Joris Vandeweerd