I'me trying to get angular-gettext to work in ionic. Could someone explain how to do that? There aren't any good explanations out there yet.
Walktrought installing angular-gettext in ionic
302 views Asked by Bastiaan Blaauw At
1
There are 1 answers
Related Questions in ANGULARJS
- How to automatically change path in angular when scrolling
- Error two clicks to be able to login Angular 16
- Passing an array of objects through the $http.post method in angular JS does not work
- Understanding how to apply Angular Signals from beginning on an existing service
- provider duplicate while compiling a Cordova application for the Android platform
- How can I use angularjs $parse service in Angular?
- Width of custom headers in ag-grid (angular) doesn't match with column's width
- Issues with Katex/ngx-markdown Rendering in Angular 16
- How to make Angular SSR wait for async operations to finish that are initiated in ngOnInit?
- I want to install @angular/google-maps npm Package in angular 16.2.12 but "npm install @angular/google-maps" this is not working/ tell me other query
- Angular 17 standalone application integrate CKEditor 5 -- Error: window is not defined
- Why is $scope >= 0 showing true in interpolation while empty in controller?
- The XMLHttpRequest compatibility library was not found
- Making Gantt Chart Column Labels More Readable
- Pass key-value pairs of object as individual arguments to component in Angular
Related Questions in INSTALLATION
- INSTALL_FAILED_DUPLICATE_PERMISSION: Package
- How can i install pyaudio on MacOS
- Problem installing Manim on Windows 11. Error regarding the wrong "decorator" version
- 'No such file or directory' installing RTC-Tools through pip
- Install Postfix Mail Server
- Plugin with id 'com.android.application' not found in Github Winlator Project
- OSError: [WinError 5] Access is denied: 'c:\\python311\\scripts\\pip.exe' Consider using the `--user` option
- Installing the C compiler for LC3
- Why is installation of MySQL on my mac is always halted
- OS: Parrot OS (hashcat : Depends: libminizip1t64 but it is not installable)
- GROMACS 2024 with CP2K 9.1 BUILD
- After the installation process When the server is running, nothing is displayed on the page myddleware
- PHP php_mongodb.dll for 32bit
- A given package is installed but spyder won't see it
- I cant install libraries?
Related Questions in IONIC-FRAMEWORK
- Firebase link existing user to anonymous account?
- Ionic Angular Standalone ion-icon are not showing at all
- Unable to run ionic app on Android emulator - [error] ADBs is unresponsive after 5000ms
- How should I filter Observables the "Right Way" with RxJs in Angular 17?
- Ionic/Capacitor: Background Location Tracking on iOS and Android?
- Best Approach for Implementing Video Selection from Gallery/Files in Ionic-React with Capacitor
- <video> tag with downloaded path in ionic ios not loads the video
- How do I record that this ionic checkbox has been checked by the user?
- Ionic 5 angular sharing a component between two modules
- mergeDebugResources FAILED
- Issue saving generated image to local filesystem in iOS using Capacitor
- Detect clickable areas within <img> tag in Ionic project
- Whitelisting Ionic app in Salesforce Org for CORS/CSP
- How to Polyfill node core modules in webpack 5 using ionic capacitor angular
- I'm developing an Android, but I can't see my "console.log" in logcat
Related Questions in ANGULAR-GETTEXT
- angular-gettext does not pick the strings from .PO files
- Translating JSON file with Angular Gettext
- angular-gettext doesn't work despit displaying no erroe
- translate directive not work in angular
- Angularjs Gettext Translate from mongodb database
- Arabian language doesn't work in angular-gettext?
- Angular-gettext doesn't update strings generated in code
- How to compile for csharp using angular-gettext?
- Angular Gettext: plural format in .po file
- angular-gettext and translating strings in ternary conditions
- Use ui-sref in .po translation file for angular-gettext
- Walktrought installing angular-gettext in ionic
- Why translations.js does not contain any string from .pot file during nggettext_compile?
- .pot file is overwritten everytime gettext.extract() is executed - old translations lost
- nggettext_compile does not extract any strings from my .PO file
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?
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)
Even thought this question is quite old, I still could not recently find much information on how to adapt the angular-gettext Getting Started guide to an Ionic app. So here is how I did it with IonicV1 and German (de_DE) translations:
1) Install angular-gettext
I added the
<script>section in the main html fileindex.htmland added the angular module toapp.run.js.2) Annotate translations
One thing not highlighted enough in the official guide is that you can annotate strings in the JS file by using
gettextContent.getString('English text')String 'English text' will be picked automatically for translation, similarly to what happen to tags marked with directivetranslate.3) Extract strings
I used angular-gettext-cli as I didn't use grunt in my Ionic project. From your project root, create a folder
i18nand then:4) Translate strings
The guide perfectly explains how to use Poedit to build a
.pofile out of the.pottemplate.5) Compile translations
angular-gettext-cli helps building translation.js containing all translated text in Javascript format.
This will create a file
translations.jscontaining all translations.6) Enable transaltions (not part of angular-gettext guide)
I then added
translations.jscreated at previous step toindex.html:And concluded by specifying the language to be used in
app.run.js: