I want to add localization in my custom angular library. It must be done using localize(not ngx-translate). I tried localize documentation nut it is not creating translation files. When I run 'ng i18n --output-path src/locale' it gives an error. Ivy extraction requires the '@angular/localize' package. Please let me know if someone know about it
How to add localization in Angular Library using localize?
399 Views Asked by Muhammad Usman At
1
There are 1 best solutions below
Related Questions in ANGULAR
- Is it possible to use ES5 JavaScript with Angular 2 instead of TypeScript?
- Module '"angular2/angular2"' has no exported member 'For'
- import syntax in typescript creating another js file in visual studio
- Separate ts file for imports
- How to use an AngularJS 2 component multiple times in the same page?
- injectables not working in angular 2.0 latest build 26
- Does angular2 bootstrap have a way to dynamically target elements like it does in angular 1.x
- Import {} from location is not found in VS Code using TypeScript and Angular 2
- Angular 2/Typescript: require not found
- ng-switch in Angular2
- Angular 2 import issue: "Zone already exported on window the object!"
- How to make FileReader work with Angular2?
- Writing the most basic Unit test in Angular 2?
- Angular2: Creating child components programmatically
- AngularJS - TypeError: Cannot read property 'canonicalUrl' of undefined
Related Questions in LOCALIZATION
- Sorting and Grouping of Korean Character (Not familiar with Korean language)
- How to change keyboard language programmatically in windows 8
- Issues using Localize.js and AngularJs
- Multiple language support in Universal App
- InstallShield exclude files based on language selection
- Building Resource-Only DLL (With al.exe) Is Raising "assembly is built by a runtime newer than the currently loaded runtime"
- Angular translate: overriding preferredLanguage in controller
- Android soft keyboard in Chinese languages
- Is short name returned in response from google places api unique?
- Verify Localizable.strings files contain the same keys
- ToLower vs ToLowerInvariant
- Change fmt:formatDate pattern dynamically
- Can not change text when using Localization Sencha ExtJs
- Force VBA to use British localisation
- Passing This(of my main form) to a class that handles direction change/and language change c#/Winforms
Related Questions in ANGULAR-LOCALIZE
- How can I localize my Angular 11 library?
- Angular App not running because of localization
- Angular i18n with em and strong?
- How to get one build for localization with @angular/localize?
- angular localize of an array of objects
- How to handle angular 11 extract-i18n overriding existing translations?
- Angular: 11.2.12 multi language localise on page refresh goes to main language
- npm build fails when using with Docker and Angular localize
- Angular 12 localized with @angular/localize run in docker with nginx
- Angular internationalization serve in development mode
- Webpack raw-loader not working after Angular update
- @angular/localize: How to use interpolation in templates?
- How to use APP_BASE_HREF with @angular/localize
- loading additional scss files or code based on the chosen locale
- Angular 10.2 build: Localized bundle generation failed: Cannot read property 'value' of undefined
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
I don't think it's possible to add the localization file inside the library . I create a few angular libraries but the localization file is inside the app that installed the libraries, and all the translation unit go to this file...
be aware if you want to implement localize in the ts file for example:
sometimes it will not work when you try to build it because the library doesn't see this function. the solution for it is to declare the method in your library: create file next to package.json file and this inside:
I hope it was helpful :)