Localization in .NET MAUI - Adding Multi-Language to Your Apps

  Рет қаралды 19,614

Gerald Versluis

Gerald Versluis

Күн бұрын

Пікірлер: 95
@jfversluis
@jfversluis 2 жыл бұрын
Whoops! Look like I made a little mistake in editing... 🫣 Can you spot where? Looking for localization on your .NET MAUI Blazor app? I've got you covered, as always: kzbin.info/www/bejne/e3nSgGyefJKIsNE
@cavanmcsweney869
@cavanmcsweney869 6 ай бұрын
Great video Gerald, the last part about writing an XAML markup extensions is brilliant. Will save me so much time moving forward when having to write apps with multiple languages
@jfversluis
@jfversluis 5 ай бұрын
They’re very powerful indeed! Glad it was useful!
@Pevi70
@Pevi70 Жыл бұрын
Dank je wel, Gerald! Click Thanks, Gerald!
@jfversluis
@jfversluis Жыл бұрын
Haha you’re welcome!
@tryabrain1sk
@tryabrain1sk 3 ай бұрын
Thank you! Very nicely explained. I'll be grateful for more videos about Maui
@jewersp
@jewersp Жыл бұрын
I learned something again today. The markup extension approach is very neat, Gerald. Thank you for this. I might pick this up in one of my blog posts in the future.
@jfversluis
@jfversluis Жыл бұрын
Excellent! Please let me know when you post it!
@jewersp
@jewersp Жыл бұрын
@@jfversluis Sure, I'll send you a message!
@marcmognol
@marcmognol 2 жыл бұрын
Hi! The way you pronounced @ 6:33 the R is perfect in French 😂😂 Bravo et merci.
@jfversluis
@jfversluis Жыл бұрын
😂 I almost never mix up Dutch with English! But decided to just let this one in. Glad I also speak French now! That reminds me, my French teacher would always say that my French tone was perfect but she couldn't understand a thing 😅
@bassoons9974
@bassoons9974 Жыл бұрын
Thanks, well build up and explained!
@jfversluis
@jfversluis Жыл бұрын
Glad it was helpful!
@mb72oz
@mb72oz Жыл бұрын
Thanks, Gerald, I'd definitely be interested in a follow-up video about the plugin mentioned at the end of this already-useful video.
@jfversluis
@jfversluis Жыл бұрын
Coming! And I actually found another plugin so I might do a video about the two for comparison
@mohammedsadiq6953
@mohammedsadiq6953 8 ай бұрын
@@jfversluis any news on this
3 ай бұрын
How to use it in code-behind(C#)? Fór example I neee it for validations and display alerts, but I cant figure it out.
@paulwainwright1453
@paulwainwright1453 3 ай бұрын
Hi Gerald, How could the below 'Incomplete' and 'Complete' strings be localized? Incomplete Complete Thanks :)
@ka4ep
@ka4ep Жыл бұрын
At last a neat and working solution instead of (Application.Current as App).MainPage = new AppShell();
@Programmidis
@Programmidis 4 ай бұрын
Thank you so much, Gerald! I made all Shell MenuBarItem(s) and MenuFlyoutItem(s) get translated automatically. It works like a charm!
@jfversluis
@jfversluis 4 ай бұрын
Well done my friend!
@rameezimtiaz6274
@rameezimtiaz6274 Жыл бұрын
Very useful video Gerald..! I I'd love if you make a video on "Connection with Google Drive API, upload/ download files to G Drive in .NET MAUI", as I search a lot and can't find any helpful resource. Would be super thankful to you. 🙂
@andrewtruckle1695
@andrewtruckle1695 Жыл бұрын
Thanks for this interesting tutorial. I know that I asked for something about localization. I am also interested in the follow up video you referred too concerning the plugin for resource management.
@jfversluis
@jfversluis Жыл бұрын
Glad it was helpful! The rest is coming soon!
@pushanroychowdhury5741
@pushanroychowdhury5741 Жыл бұрын
Thanks Gerald for this. I have a request: can you please make a video on how to create a custom control with Handlers ?
@hungchip
@hungchip 6 ай бұрын
why not use MVVM? How should I write the last 2 methods in LocalizationResourceManager file with MVVM?
@markoliberty7581
@markoliberty7581 11 ай бұрын
How do you change the datetime settings of a datetime picker? Month, day names stay the same, they dont change like that.
@its-AliRaza
@its-AliRaza Жыл бұрын
Thanks, everything working fine. I have a question that is this possible that we have list of languages in MVVM and we have added the translation in resource file against keys and list bind to collection view. Can we get the translation of that keys through bindings ?
@bashobbel3575
@bashobbel3575 Жыл бұрын
Cool , the last option is very nice
@jfversluis
@jfversluis Жыл бұрын
Yep that makes it nice and easy! And even better with the plug-in I mentioned because you don’t even need to do the work 😬
@torres0945
@torres0945 Жыл бұрын
And if we have our app opened and change language from android system how we can get this event?
@pr0_secrurity876
@pr0_secrurity876 2 жыл бұрын
Hello Gerald, can you make a video about inApp purchase for android/ios/windows/mac
@mohammedalsabahii2
@mohammedalsabahii2 2 жыл бұрын
Awesome video we are waiting this video ,, actually there's a question some languages need to change also loading lable text from left to right or right to left so using this tool can i change FlowDirection as runtime from mvvm ?! ,, thank you for this helping video wish you a good day
@jfversluis
@jfversluis 2 жыл бұрын
Ah that's a great question! I guess you'd also have to save some information about if it's a RTL language and switch that property for your app accordingly.
@mohammedalsabahii2
@mohammedalsabahii2 2 жыл бұрын
@@jfversluis thank you i will
@frankpohl5620
@frankpohl5620 Жыл бұрын
This is nice for the strings that are used in the program. How can the DisplayName for the app be localized? In UWP it was possible to define a reference with ms-resource:. For example putting ms-resource:AppTitle in the field "Display name" in the manifest would use the strings defined as AppTitle in the resources. But I could not get that working in .NET MAUI. Can you point me in the right direction?
@infinitezymalny
@infinitezymalny 3 ай бұрын
How can I managed this with IValueConverter?
@dsantasot
@dsantasot Жыл бұрын
How this can be done using the new .NET MAUI extension in VS Code? 🤔
@jfversluis
@jfversluis Жыл бұрын
You can’t unless there is an extension for it. Else you’ll have to do it manually
@manfredrohleder4674
@manfredrohleder4674 Жыл бұрын
Hi Gerald, how can I localize the info.plist?
@Tamer_Ali
@Tamer_Ali 2 жыл бұрын
Hi Gerald, Thanks for the awesome video I think Community Toolkit has a localization package I used it long time ago with Xamarin Forms. How to change the direction of the app?
@alibourkaib3003
@alibourkaib3003 Жыл бұрын
Sir how to add change Language in new Shellcontent.... { Title=AppResource.....(here) }
@jfversluis
@jfversluis Жыл бұрын
I’m sorry, not sure what you mean
@alibourkaib3003
@alibourkaib3003 Жыл бұрын
I want to change language in shell in cs
@yasminaamroun8682
@yasminaamroun8682 Жыл бұрын
@ALI BOURKAIB did it work with you in the Shel?
@vitalikdm0685
@vitalikdm0685 Жыл бұрын
For those who has a VS compilation error . Change resource file property Build Action from Android Resource (that is set my default after creation in my case), just change it to Embedded Resource
@Jake-jk5ng
@Jake-jk5ng 4 ай бұрын
Thank you so much!
@jfversluis
@jfversluis 4 ай бұрын
You’re very welcome!
@somerandominformation
@somerandominformation Жыл бұрын
Do you know how to translate an application dynamically by using Azure Translator or something? Because defining everything yourself in a separate file is not really scalable...
@jfversluis
@jfversluis Жыл бұрын
On windows use the Resxmanager plugin which has cloud powered translations. Doing it manually might not be great but it’s still the only way to be sure that your translations will be the best they can in each language. It just an intensive process unfortunately
@CliffShivkar
@CliffShivkar 3 ай бұрын
Follow up video with what Svensson has done, please!
@jfversluis
@jfversluis 3 ай бұрын
You mean this one? kzbin.info/www/bejne/f3Pdan6rZ5mNfbs
@Alfred545
@Alfred545 Жыл бұрын
My visual studio doesn't recognize using ProjectName.Resources.Something, but i followed all you steps.Should i have some class in Resources folder?
@jfversluis
@jfversluis Жыл бұрын
Make sure that you have set the access modifier to public
@stevehutch
@stevehutch Жыл бұрын
@@jfversluis Hi Gerald, I am having this problem too, Visual Studio for Mac does not show the graphical editor, and also the ProjectName.Resources.Languages is not recognised and gives compilation error every time? The ViewModel, Model, Views folder are all recognised, but for some strange reason I cannot reference the Resources folder from a XAML page. I have set the build properties of the Resource.resx file as follows : Build action "embedded resource" copy to output directory : "do not copy", Custom Tool : PublicResXFileCodeGenerator, Custom To Namespace (left empty).
@svez88
@svez88 Жыл бұрын
Halo from Indonesia. Gerald , thanks for the share good information, i want to know more about ResXManager and the AI, please introduce us how to implement that , God bless =)
@IvanKozlov-re9ez
@IvanKozlov-re9ez Жыл бұрын
Hi Gerald! Thanks for your video! I have a question. Can we localize MAUI controls like Picker. What if I want to change language for "Cancel" button?
@jfversluis
@jfversluis Жыл бұрын
This should help with that: blog.verslu.is/xamarin/xamarin-forms-xamarin/localization-default-ios-controls/
@JasonPurkiss
@JasonPurkiss 2 жыл бұрын
I think I went a bit nuts when I found out you could do this a few years ago as I think adding 40 languages was a bit much and stopped when trying to add Star Trek Klingon :) if you want to test for me just search for DigitalShop :)
@JasonPurkiss
@JasonPurkiss 2 жыл бұрын
worked very well
@jfversluis
@jfversluis 2 жыл бұрын
Haha Klingon even! That's inclusiveness to the max!
@tanakamawere
@tanakamawere Жыл бұрын
Hie Gerald, unrelated to the video. It's a thought I recently had. I connected my app to the app centre and whenever the app crashed, it sent reports to Github. This was an Android .NET MAUI app. So the errors were in 'Android language' like "Java. something is null". How do I convert such platform specific errors to .NET MAUI specific errors?
@jfversluis
@jfversluis Жыл бұрын
Depending on what it is exactly you can't really. Some stuff just happens on the underlaying layer. It will take some experience to start recognizing those errors.
@singhwong
@singhwong Жыл бұрын
Your video helped me a lot, I want to know how to localize app name in Maui.
@thomasgalliker
@thomasgalliker 9 ай бұрын
Great tutorial. Sadly, Multilingual App Toolkit is not (yet) supported on .NET MAUI. Is there any progress?
@jfversluis
@jfversluis 9 ай бұрын
I don't think so unfortunately!
@thomasgalliker
@thomasgalliker 9 ай бұрын
You can temporarily enable a separate library with Multilingual App Toolkit, e.g. a netstandard2.0 class library. Later, when MAT supports MAUI projects, we can move the translations back to the MAUI project.Just as proposed here: github.com/microsoft/Multilingual-App-Toolkit/issues/10 @@jfversluis
@giovanninovati7301
@giovanninovati7301 Жыл бұрын
Thanks, that works fine on Android, but in IOS it doesn't work at all! What's happening? What can we do?
@jfversluis
@jfversluis Жыл бұрын
Without any details that will be hard to say!
@giovanninovati7301
@giovanninovati7301 Жыл бұрын
@@jfversluis I created a new project and followed your tutorial step by step. I did exactly what you did. It compiles on both platforms. On android it works as expected, but on IOS the language does not change, even after i restart the app. Should i add a link to the project?
@Lanthiren
@Lanthiren 2 жыл бұрын
Could you please do a media element video for an audio media player?
@jfversluis
@jfversluis Жыл бұрын
When MediaPlayer is released I will do a video on it again :)
@vitaliinnest
@vitaliinnest Жыл бұрын
thx for the solution
@jfversluis
@jfversluis Жыл бұрын
You're most welcome!
@ihassantariq
@ihassantariq 9 ай бұрын
@Gerald is RTL is supported like arabic lanaguage in .NET MAUI everywhere I have searched and found that there are still bugs. Thanks
@gwisekor
@gwisekor Жыл бұрын
goooooood
@jfversluis
@jfversluis Жыл бұрын
Thanks!
@KyleBeckman43
@KyleBeckman43 Жыл бұрын
I really like this approach, but the only downside I can see is the lack of intellicense as you're typing in the name of the resource to ensure proper spelling. Any idea if there's a way to get the list of options to show up as you're typing your XAML?
@jfversluis
@jfversluis Жыл бұрын
It depends on which method you're using. The first method definitely should show IntelliSense although it wasn't working in the video. The method with the extensions will indeed not have IntelliSense support unfortunately.
@jamg.barett749
@jamg.barett749 Жыл бұрын
Please make a video of google adsense on maui.
@jfversluis
@jfversluis Жыл бұрын
It’s on my todo list!
@krishnalekkala6506
@krishnalekkala6506 Жыл бұрын
kzbin.info/www/bejne/j3molYOdZtuIqJI Hi, thank you so much for the video. Please note that this solution for me seems to be problematic if you compile in release mode. It seems to fail and you only see Microsoft.Maui.Controls.Binding for all the strings. (for me, only in release mode). Do you have guidance on that? Hi @gerald any idea on this issue ?
@luigyavila7985
@luigyavila7985 Жыл бұрын
It's true in release mode it doesn't work, did you find any solution for this?
@OscarRodriguezArdila
@OscarRodriguezArdila Жыл бұрын
Hi does this work on IOS?
@jfversluis
@jfversluis Жыл бұрын
Definitely should, yes
@OscarRodriguezArdila
@OscarRodriguezArdila Жыл бұрын
@@jfversluis I tried and it doesn't change the language when clicking the button in your project. Could it be something with permissions of the app?
@giovanninovati7301
@giovanninovati7301 Жыл бұрын
I have the same problem. Did you find out a solution?
@きふわらべ
@きふわらべ Жыл бұрын
Great! Thank you. I use it.
@jfversluis
@jfversluis Жыл бұрын
Great! Good luck!
@osamaiqbal6702
@osamaiqbal6702 Жыл бұрын
public object this[string resourceKey] => AppResources.ResourceManager.GetObject(resourceKey, AppResources.Culture) ?? Array.Empty(); this is not working when i tried it from .xaml file Any Solution??
Highly Customizable Popups for .NET MAUI with Mopups
18:20
Gerald Versluis
Рет қаралды 33 М.
Material Design & Free Controls for .NET MAUI with UraniumUI
16:30
Gerald Versluis
Рет қаралды 21 М.
黑天使只对C罗有感觉#short #angel #clown
00:39
Super Beauty team
Рет қаралды 36 МЛН
Tuna 🍣 ​⁠@patrickzeinali ​⁠@ChefRush
00:48
albert_cancook
Рет қаралды 148 МЛН
Look here FIRST when trying to Scrape Data
28:15
John Watson Rooney
Рет қаралды 1,3 М.
Use .NET MAUI FilePicker to Pick PDFs, Images, Videos and More!
15:24
Gerald Versluis
Рет қаралды 21 М.
Animating Controls in .NET MAUI & Xamarin.Forms
19:19
James Montemagno
Рет қаралды 27 М.
Effective Alerts with Snackbar & Toast with .NET MAUI
15:39
Gerald Versluis
Рет қаралды 12 М.
.NET Aspire for Beginners - Full Series
1:28:16
dotnet
Рет қаралды 17 М.
.NET MAUI Barcode & QR Code Scanning Like a PRO!
12:03
James Montemagno
Рет қаралды 24 М.
The Right Way to Conditional Render in .NET MAUI
13:44
SingletonSean
Рет қаралды 5 М.
BottomSheet Plugin for Blazor Hybrid & .NET MAUI
24:05
Gerald Versluis
Рет қаралды 4,5 М.
Start Your New .NET MAUI App with These Amazing Templates!
15:06
Gerald Versluis
Рет қаралды 25 М.
黑天使只对C罗有感觉#short #angel #clown
00:39
Super Beauty team
Рет қаралды 36 МЛН