How to Localise Your Ionic 4 App with ngx-translate

  Рет қаралды 23,670

Simon Grimm

Simon Grimm

Күн бұрын

Пікірлер: 83
@ionhipster7221
@ionhipster7221 2 жыл бұрын
Hi Simon! @6:49 - One small cautionary tip I'd share is to set the default language to 'en' (or 'de' 😉) instead of the users browserLang to handle cases where you don't have a translation for their local language code. Otherwise, users may see an awkward {{ 'HOME.btn' | translate }} string instead of "Show Alert". Awesome video! 🧡
@caducastanha5645
@caducastanha5645 5 жыл бұрын
Hello Simon, I've been working with ionic for 1 year, your videos always help me and I learn a lot from you. I'm really enjoying ionic 4
@galaxies_dev
@galaxies_dev 5 жыл бұрын
Really glad you enjoy them Carlos, and yes I like v4 as well a lot by now :)
@abdullokhmukhammadjonob3891
@abdullokhmukhammadjonob3891 4 жыл бұрын
Hello Simon. Thank you so much. As a beginner I am learning most of my coding skills from you. Soon, I am planning to post my first freelancing job indicating YOU as my mentor.
@chmoxster
@chmoxster 5 жыл бұрын
The readme file summing up the previous steps is a very good idea !
@maxneumann1159
@maxneumann1159 3 жыл бұрын
Tried different methods for localization and this is the best so far. Thank you for that nice tutorial! Had some trouble to get it working with Firebase Authguard because of the autorouting based on the auth status but moving the locale files to asset/locale/xyz.json fixed the request error.
@caginbektas
@caginbektas 4 жыл бұрын
dude, twice a day, you made my day :D Thanks for all your efforts!
@galaxies_dev
@galaxies_dev 4 жыл бұрын
Happy to hear that!
@tininottiny8685
@tininottiny8685 5 жыл бұрын
This is so much fun to watch Simon. I get to learn German, curse at the compiler and learn i18n! love it! :-)
@galaxies_dev
@galaxies_dev 5 жыл бұрын
Haha yeah I thought about teaching one German phrase in every video x) Glad you enjoyed it!
@pathumjayasuriya5902
@pathumjayasuriya5902 3 жыл бұрын
Thanks Simon ' The Ionic Savior'.
@UnknownIdentityDE
@UnknownIdentityDE 4 жыл бұрын
Thanks Simon. Thats exactly the missing piece in my project. Your tutorials are definitely benefitial. Keep it up! Grüße aus Frankfurt a. M.
@galaxies_dev
@galaxies_dev 4 жыл бұрын
Thanks a lot Steffen!
@prasannakumarn5036
@prasannakumarn5036 2 жыл бұрын
Hello Simon.. Thank you So much for your tutorials it will help full to me carrier path.. Can you please provide the some tutorials for translating the parameters inside the objects by using of Ngfor Directive.
@sanjaychauhan83
@sanjaychauhan83 3 жыл бұрын
Thanks simon, this is very useful to me...you are great
@galaxies_dev
@galaxies_dev 3 жыл бұрын
You are welcome!
@roshan.animation
@roshan.animation 5 жыл бұрын
Hello Simon Grimm My page view is not updating, but when I go to another page and come back , the view gets updated with new language.
@idemshall
@idemshall 4 жыл бұрын
Once again... You saved me... Thanks a lot...
@galaxies_dev
@galaxies_dev 4 жыл бұрын
Happy to help!
@stojankukrika7242
@stojankukrika7242 4 жыл бұрын
Hi Simon. Thank you for the nice tutorial. Can you tell us how to handle translations on modals? I try this {{'dashboard.title' | translate}} but I get an error: Uncaught (in promise): Error: The pipe 'translate' could not be found! I can't find any solution which works.
@galaxies_dev
@galaxies_dev 4 жыл бұрын
That usually means something with the modals is messed up. You should add the module file of the modal to the module of the page where you call the modal, then this Angular error should disappear! Or you might have to include something else in the module of the modal - but it's something like this :)
@stojankukrika7242
@stojankukrika7242 4 жыл бұрын
@@galaxies_dev Can you make some tiny example of that?
@santhoshbolla6492
@santhoshbolla6492 4 жыл бұрын
Hello, Simon. Thank you very much for all the tutorials, How can I translate dynamic content which comes through API Calls.
@HVSharma
@HVSharma 3 жыл бұрын
You've to translate the dynamic content at the back-end and then sent it to the front-end
@studykiya397
@studykiya397 3 жыл бұрын
thanks simon
@joelpangop5170
@joelpangop5170 4 жыл бұрын
Hi Simon, thanks a lot for this tutorial but i did all the steps specified in the video but my translate doesn't work. I have a nativeStorageError code 2
@ritesh5160
@ritesh5160 4 жыл бұрын
Hello Simon, I've been working with ionic for 1 year and i have learned a lot from your videos, I like lonic very much, But i am currently having a doubt,can you tell how to use this with the rest api
@galaxies_dev
@galaxies_dev 4 жыл бұрын
I think you can load the translation files from your server like this: stackoverflow.com/questions/52165296/angular6-load-translations-using-api-call-to-backend-using-ngx-translate
@stefanomattiatroisi2018
@stefanomattiatroisi2018 3 жыл бұрын
Hi Simon, well done video seriously. I hope you can help me: i need to manage the translate of the products in the cart. I have a service and a preload list of products, how can i use the translate to actually "translate" the product name and description?
@galaxies_dev
@galaxies_dev 3 жыл бұрын
I guess you could call a function and iterate all items and translate them from code with the according function of ngx-translate!
@HVSharma
@HVSharma 3 жыл бұрын
If anybody's facing an issue in not loading language in HTML files via translate pipe. There's minor change in app.module.ts Change the path from 'assets/i18n' to './assets/i18n/'
@Xsoul55
@Xsoul55 5 жыл бұрын
I am currently developing a Map App for buissnes and I needed some translation method, thanks ¡You saved my job! Any way we can see a tutorial on yaga-leaflet? Keep the good work ^^
@galaxies_dev
@galaxies_dev 5 жыл бұрын
Hmm right now I have no plans, but of course this might change in the future! But this package looks interesting: github.com/yagajs/leaflet-ng2
@anuragdhiman3322
@anuragdhiman3322 4 ай бұрын
Thankyou Simon
@LexMadafaka
@LexMadafaka 3 жыл бұрын
Really really useful. Thanks a lot.
@galaxies_dev
@galaxies_dev 3 жыл бұрын
You are welcome!
@علياءاسامه-ت4م
@علياءاسامه-ت4م 4 жыл бұрын
very good tutorial ,thanks alot
@galaxies_dev
@galaxies_dev 4 жыл бұрын
You are welcome!
@HelmarBaechle
@HelmarBaechle 5 жыл бұрын
if I use localization will all the content be translated into the required language automatically, or do I have to translate each page manually?
@galaxies_dev
@galaxies_dev 5 жыл бұрын
You have to setup the JSON files with the strings, they are not automatically translated!
@HelmarBaechle
@HelmarBaechle 5 жыл бұрын
@@galaxies_devGrimm thanks for the advice. I have watched the tutorial on your academy in the meantime and it is clearly explained on that video.
@ViNinjaa
@ViNinjaa 5 жыл бұрын
Hello Simon, you could do some content about accessibility and ionic 4,? As an app for blind peoples, etc..
@galaxies_dev
@galaxies_dev 5 жыл бұрын
Interesting, never done anything on that but sounds like I should!!
@ViNinjaa
@ViNinjaa 5 жыл бұрын
​@@galaxies_dev yees, it wil be awesome!
@createfinders
@createfinders 3 жыл бұрын
Sir using translate pipe crashes my app only work on google crome rest no other browser also when i install app on my mobile it installs but after splashscreen it showd white screen.. what is solutions for this
@oko2708
@oko2708 4 жыл бұрын
I got an Illegal constructor error because I forgot to import @ionic/storage into my language service. Hope this helps if people run into the same issue.
@mikeleins6705
@mikeleins6705 4 жыл бұрын
Hi Simon, does the getBrowserLang() method also work on androi/ios devices later on ?
@galaxies_dev
@galaxies_dev 4 жыл бұрын
Haven't tried right now but I assume it does!
@markrumbaoa7153
@markrumbaoa7153 Жыл бұрын
It's great 😃
@its_j10
@its_j10 Жыл бұрын
Hello, My application is very big and I want to change whole application language (all the words) into different language, So it is compulsory to create a json file and write each and every words and their translated word? or is there any way to directly change whole application language with a single configuration?
@galaxies_dev
@galaxies_dev Жыл бұрын
Not that I know of :/
@jaydeeprathod8116
@jaydeeprathod8116 4 жыл бұрын
Static data is working good but how to translate dynamic data?
@galaxies_dev
@galaxies_dev 4 жыл бұрын
I'm not sure how that would actually be possible, you would need translations for a lot of strings then, right?
@lokeshgupta5452
@lokeshgupta5452 4 жыл бұрын
Hello sir, I have minor query , if I want to translate the whole application into other language but i dont want to use the data from json file infact i want to translate the whole app data, whatever be the content in the pages will be translated into other language, could you please help me in this sir Thanks
@lunokhodtoy
@lunokhodtoy 3 жыл бұрын
I have problems when switching more than 2 languages, some times the swishing only hapen when page is manually refreshed also ngx-translate says in documentation that you have to manually reload translations on the switch so this tutorial is incomplete
@khawlamahjoub2943
@khawlamahjoub2943 4 жыл бұрын
hello simon ,fist of all thank you so much.then,i have this error ([ng] ERROR in node_modules/@ngx-translate/http-loader/lib/http-loader.d.ts(2,33): error TS2307: Cannot find module '@ngx-translate/core'. ) how can i solve it
@ricardosupe5490
@ricardosupe5490 Жыл бұрын
It works on IONIC 6?
@bundayyolayinka3352
@bundayyolayinka3352 5 жыл бұрын
great stuff. Been following since last year! always impressive
@galaxies_dev
@galaxies_dev 5 жыл бұрын
Thanks Bundayy, always appreciate loyal follower!
@aaiz37
@aaiz37 5 жыл бұрын
Well done bro !!!
@triple3way
@triple3way 5 жыл бұрын
thanks simon appreciate
@meetdurian4539
@meetdurian4539 4 жыл бұрын
Hi ,i need help,how to change the default language to English, I have changed many places and failed.
@manarmohammad8232
@manarmohammad8232 Жыл бұрын
thank you
@galaxies_dev
@galaxies_dev Жыл бұрын
You're welcome!
@avishekchatterjee531
@avishekchatterjee531 3 жыл бұрын
Is this is the same way to implement the localize for an ionic react app?
@galaxies_dev
@galaxies_dev 3 жыл бұрын
I haven't used React but this is an Angular package, so likely this way won't work!
@avishekchatterjee531
@avishekchatterjee531 3 жыл бұрын
@@galaxies_dev yeah I know that.
@erperejildo
@erperejildo 4 жыл бұрын
9:34 why you had to reboot the server at that point?
@galaxies_dev
@galaxies_dev 4 жыл бұрын
Sometimes it's just not picking up changes and restarting most of the time fixes the problem!
@guendouze77
@guendouze77 5 жыл бұрын
Hello, Thank you very much for all the tutorials Can you offer us a push notification with firebase. Again, thank you very much from France.
@galaxies_dev
@galaxies_dev 5 жыл бұрын
I have a course released on that topic for the members of my Ionic Academy :)
@aaronaaronaaron5922
@aaronaaronaaron5922 4 жыл бұрын
In at leatst hundreds of languages: Thanks 🏋️‍♀️
@galaxies_dev
@galaxies_dev 4 жыл бұрын
Glad I could help :)
@pramodjb2415
@pramodjb2415 5 жыл бұрын
hi thanks for the video but i'm getting the error --- Uncaught Error: Template parse errors: 'ion-router-outlet' is not a known element: 1. If 'ion-router-outlet' is an Angular component, then verify that it is part of this module. 2. If 'ion-router-outlet' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. (" [ERROR ->] "): ng:///AppModule/AppComponent.html@1:2 'ion-app' is not a known element: 1. If 'ion-app' is an Angular component, then verify that it is part of this module. 2. If 'ion-app' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("[ERROR ->] "): ng:///AppModule/AppComponent.html@0:0 at syntaxError (compiler.js:2430) at TemplateParser.push../node_modules/@angular/compiler/fesm5/compiler.js.TemplateParser.parse (compiler.js:20605) at JitCompiler.push../node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler._parseTemplate (compiler.js:26171) at JitCompiler.push../node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler._compileTemplate (compiler.js:26158) at compiler.js:26101 at Set.forEach () please help me
@galaxies_dev
@galaxies_dev 5 жыл бұрын
Are you using a custom component? Then you might have to import the Ionic module to the module of that component to make it work!
@pramodjb2415
@pramodjb2415 5 жыл бұрын
@@galaxies_dev OK thanks
@pramodjb2415
@pramodjb2415 5 жыл бұрын
hi Simon please help me
@eldelotrodia1102
@eldelotrodia1102 4 жыл бұрын
Nice german tutorial haha
@galaxies_dev
@galaxies_dev 4 жыл бұрын
;)
@007ento
@007ento 4 жыл бұрын
iconscout.com/icon-pack/country-flags# flag icons suggestion
@globaltrite
@globaltrite 4 жыл бұрын
Servus, nur weil du ein kurzes Video haben willst, ist es kein Grund durch das Tutorial zu rasen. Lieber ist es eine halbe Stunde statt ein wildes hin und her geklicke zwischen den Fenstern. Man kann nicht mal in Ruhe schauen. Will man mal anhalten bist du schon wieder ganz woanders.
@galaxies_dev
@galaxies_dev 4 жыл бұрын
Sorry if my tutorial was too fast, I'll take care of navigating more slowly the next time!
Getting Started with Ionic 4 and Socket.io
23:22
Simon Grimm
Рет қаралды 18 М.
PIZZA or CHICKEN // Left or Right Challenge
00:18
Hungry FAM
Рет қаралды 14 МЛН
Who's spending her birthday with Harley Quinn on halloween?#Harley Quinn #joker
01:00
Harley Quinn with the Joker
Рет қаралды 21 МЛН
бабл ти гель для душа // Eva mash
01:00
EVA mash
Рет қаралды 8 МЛН
10 Tools & Services Every Ionic Developer Should Know
21:25
Simon Grimm
Рет қаралды 26 М.
How to Protect your Ionic 4 App with Fingerprint & FaceID
16:15
Simon Grimm
Рет қаралды 21 М.
5 Animation Packages You Can Immediately Use Inside Your Ionic App
18:30
How to translate your Angular 16 app with ngx-translate?
8:44
10 Simple Ionic Hacks
25:41
Simon Grimm
Рет қаралды 32 М.
How to Create Ionic 4 Chat Bubbles with Elastic Textarea
19:10
Simon Grimm
Рет қаралды 28 М.
Coding a Web Server in 25 Lines - Computerphile
17:49
Computerphile
Рет қаралды 343 М.
Introduction to Internationalization in Angular
13:04
Angular
Рет қаралды 130 М.
Improving Your Ionic Splash Screen with Animations
16:25
Simon Grimm
Рет қаралды 64 М.
PIZZA or CHICKEN // Left or Right Challenge
00:18
Hungry FAM
Рет қаралды 14 МЛН