ride/web-i18n-expose 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ride/web-i18n-expose

最新稳定版本:1.1.1

Composer 安装命令:

composer require ride/web-i18n-expose

包简介

Ride module to expose the i18n translator to javascript

README 文档

README

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:

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:

rideApp.translator.submitTranslationKeys();

Related Modules

Installation

You can use Composer to install this application.

composer require ride/web-i18n-expose

统计信息

  • 总下载量: 4.03k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 4
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 11
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-04-21