How to Localise Your Ionic 4 App with ngx-translate

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

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.
@caginbektas
@caginbektas 3 жыл бұрын
dude, twice a day, you made my day :D Thanks for all your efforts!
@galaxies_dev
@galaxies_dev 3 жыл бұрын
Happy to hear that!
@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!
@chmoxster
@chmoxster 5 жыл бұрын
The readme file summing up the previous steps is a very good idea !
@pathumjayasuriya5902
@pathumjayasuriya5902 3 жыл бұрын
Thanks Simon ' The Ionic Savior'.
@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!
@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.
@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/'
@idemshall
@idemshall 3 жыл бұрын
Once again... You saved me... Thanks a lot...
@galaxies_dev
@galaxies_dev 3 жыл бұрын
Happy to help!
@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 4 жыл бұрын
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.
@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
@studykiya397
@studykiya397 3 жыл бұрын
thanks simon
@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.
@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
@anuragdhiman3322
@anuragdhiman3322 2 ай бұрын
Thankyou Simon
@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?
@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.
@LexMadafaka
@LexMadafaka 3 жыл бұрын
Really really useful. Thanks a lot.
@galaxies_dev
@galaxies_dev 3 жыл бұрын
You are welcome!
@meetdurian4539
@meetdurian4539 4 жыл бұрын
Hi ,i need help,how to change the default language to English, I have changed many places and failed.
@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
@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 :/
@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
@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
@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
@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?
@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!
@bundayyolayinka3352
@bundayyolayinka3352 5 жыл бұрын
great stuff. Been following since last year! always impressive
@galaxies_dev
@galaxies_dev 5 жыл бұрын
Thanks Bundayy, always appreciate loyal follower!
@علياءاسامه-ت4م
@علياءاسامه-ت4م 4 жыл бұрын
very good tutorial ,thanks alot
@galaxies_dev
@galaxies_dev 4 жыл бұрын
You are welcome!
@markrumbaoa7153
@markrumbaoa7153 Жыл бұрын
It's great 😃
@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
@santhoshbolla6492
@santhoshbolla6492 3 жыл бұрын
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
@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!
@ricardosupe5490
@ricardosupe5490 Жыл бұрын
It works on IONIC 6?
@aaiz37
@aaiz37 5 жыл бұрын
Well done bro !!!
@triple3way
@triple3way 5 жыл бұрын
thanks simon appreciate
@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
@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 :)
@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!
@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.
@manarmohammad8232
@manarmohammad8232 Жыл бұрын
thank you
@galaxies_dev
@galaxies_dev Жыл бұрын
You're welcome!
@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!
@aaronaaronaaron5922
@aaronaaronaaron5922 4 жыл бұрын
In at leatst hundreds of languages: Thanks 🏋️‍♀️
@galaxies_dev
@galaxies_dev 4 жыл бұрын
Glad I could help :)
@pramodjb2415
@pramodjb2415 5 жыл бұрын
hi Simon please help me
@007ento
@007ento 4 жыл бұрын
iconscout.com/icon-pack/country-flags# flag icons suggestion
@eldelotrodia1102
@eldelotrodia1102 4 жыл бұрын
Nice german tutorial haha
@galaxies_dev
@galaxies_dev 4 жыл бұрын
;)
@globaltrite2970
@globaltrite2970 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 М.
5 React Native Tips to WOW Your Users
16:36
Simon Grimm
Рет қаралды 24 М.
МЕБЕЛЬ ВЫДАСТ СОТРУДНИКАМ ПОЛИЦИИ ТАБЕЛЬНУЮ МЕБЕЛЬ
00:20
Секрет фокусника! #shorts
00:15
Роман Magic
Рет қаралды 116 МЛН
10 Simple Ionic Hacks
25:41
Simon Grimm
Рет қаралды 32 М.
No, Einstein Didn’t Solve the Biggest Problem in Physics
8:04
Sabine Hossenfelder
Рет қаралды 285 М.
Simple Code, High Performance
2:50:14
Molly Rocket
Рет қаралды 250 М.
React Native vs Flutter - Which should you use?
22:31
Simon Grimm
Рет қаралды 31 М.
How to Implement Ionic 4 Role Based Authentication Routing
30:17
Simon Grimm
Рет қаралды 15 М.
How to Send Push Notifications to Your Ionic 4 App With OneSignal
25:11
How to Do 90% of What Plugins Do (With Just Vim)
1:14:03
thoughtbot
Рет қаралды 895 М.
Google Apps Script: Creating Managing, and Automating Projects with Script
1:54:55
How to Build an Ionic 4 App with Offline Mode
15:03
Simon Grimm
Рет қаралды 28 М.
How to Build an Ionic HTTP Loading Interceptor & Retry Logic
25:18