innova/angular-ui-translation-bundle
Composer 安装命令:
composer require innova/angular-ui-translation-bundle
包简介
Provides a new Angular JS filter which can access to Symfony 2 translations.
README 文档
README
Provides Symfony 2 translations into your AngularJS application.
Installation
$ composer require "innova/angular-ui-translation-bundle" "~5.0"
Requirements
How To Use ?
As BazingaExposeTranslation, the filter implements the Symfony2
TranslatorInterface
and provides the same trans() and transChoice() methods:
{{ 'translation_id' | trans:{}:'DOMAIN_NAME' }}
// the translated message or the translation id
{{ 'translation_id' | transChoice:1:{}:'DOMAIN_NAME' }}
// the translated message or the translation id
If you want to access translations for a specific domain, don't forget to include translation JS file.
Example using assetic :
{% javascripts 'js/translations/DOMAIN_NAME/*.js' %}
<script src="{{ asset_url }}"></script>
{% endjavascripts %}
统计信息
- 总下载量: 1.69k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-03-18