Nuclear Powered Marshmallows

    angular-tiny-translate

    1.1.1 • Public • Published

    npm npm Dependency Status devDependency Status

    angular-tiny-translate

    install

    npm install angular-tiny-translate -S
    

    Small modular library for translations without unused dust

    angular
      .module('my.app', [
        'angular-tiny-translate'
      ])
     
      /*@ngInject*/
      .config((TinyTranslate) => {
        TinyTranslate.translates({
          'some_prefix1': {
            'some_key1': 'some_translation1'
          },
          'some_prefix2': {
            'some_key2': 'some_translation2',
            '*': '{*} times'
          }
        })  
      })
      <!-- someVar = 'some_key2' -->
      <h1>{{ someVar | tr: 'some_prefix2' }}</h1>
      <!-- result -->
      <h1>some_translation2</h1>
      <!-- someVar = '5' -->
      <h1>{{ someVar | tr: 'some_prefix2' }}</h1>
      <!-- result -->
      <h1>5 times</h1>

    Install

    npm i angular-tiny-translate

    DownloadsWeekly Downloads

    9

    Version

    1.1.1

    License

    MIT

    Last publish

    Collaborators

    • alxe.master