1.4.2 • Published 5 years ago

@andrewwormald/i18n-extended v1.4.2

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

Completing everything that is missing in Angular's i18n package

logo


i18n-extended NPM version NPM monthly downloads NPM total downloads

created by Andrew Wormald
SwiftySpartan / @andrewwormald

####Notes

Installation:

Step 1:
    npm install -g @andrewwormald/i18n-extended@latest --save
Step 2:
    i18n-extended 
    ./node_modules/.bin/i18n-extended 
Step 3:
    import { i18nExtended, I18N_EXTENDED_DATA } from '@andrewwormald/i18n-extended';
    
    // This file is generated at the root of the app
    import { i18nDataMap } from '../../../../i18n.extended.map';
    
    providers: [
        {
          provide: I18N_EXTENDED_DATA,
          useValue: () => i18nDataMap(),
        },
    ]
Step 4:
    import { i18nExtended } from '@andrewwormald/i18n-extended';

   class myComponent {
        title: string;
        
        constructor(private translateService: i18nExtended) {
            // This needs to match the <target-language> attribute value in the .xlf file>
            this.translateService.setLanguage('fr');
        }
        
        myMethod() {
            // Calling `translateText()` will be part of marking the text for extraction
            // as well as fetching the translated text at runtime. If nothing is found or if
            // the text has not yet been translated, the provided text will be returned as is.  
            this.title = this.translateService.translateText('I like i18n-extended!');
        }
   }
1.4.2

5 years ago

1.4.1

5 years ago

1.4.0

5 years ago

1.4.0-beta.7

5 years ago

1.4.0-beta.6

5 years ago

1.4.0-beta.5

5 years ago

1.4.0-beta.4

5 years ago

1.4.0-beta.3

5 years ago

1.4.0-beta.2

5 years ago

1.4.0-beta.1

5 years ago

1.4.0-beta.0

5 years ago

1.3.7

5 years ago

1.3.7-beta.3

5 years ago

1.3.7-beta.2

5 years ago

1.3.7-beta.1

5 years ago

1.3.7-beta.0

5 years ago

1.3.6

5 years ago

1.3.5

5 years ago

1.3.4

5 years ago

1.3.3

5 years ago

1.3.2

5 years ago

1.3.1

5 years ago

1.3.0

5 years ago

1.2.8

5 years ago

1.2.7

5 years ago

1.2.6

5 years ago

1.2.5

5 years ago

1.2.4

5 years ago

1.2.3

5 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.10

5 years ago

1.1.8

5 years ago

1.1.7

5 years ago

1.1.6

5 years ago

1.1.5

5 years ago

1.1.4

5 years ago

1.0.0

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.9

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago