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

preview_player
Показать описание
Just like any other .NET project you can localization your .NET MAUI apps with the use of resx resource files. In this video I will show you 3 ways, each one a slight improvement over the other, to add localization to your app and make your .NET MAUI app speak multiple languages.

💝 Join this channel to get access to perks:

Disclaimer: this channel is done on personal title, in my free time, and not officially affiliated with or endorsed by Microsoft (my employer) in any way. Opinions and views are my own.

🔗 Links

⏱ Timestamps
0:00 - Localization in .NET MAUI
0:11 - What is Localization?
0:53 - Add Resx Resource Files
3:39 - Add Localization in XAML
5:42 - Add Translated Resource Resx File
8:09 - Dynamically Update Localization with LocalizationResourceManager
11:19 - Use LocalizationResourceManager in XAML
12:10 - Implement Switching Languages in Code
13:23 - Translate Strings From Code, with Parameters!
15:48 - DEMO FAIL!1!!
16:14 - Fix the Demo!
17:24 - Working Dynamic Swithing Demo
18:05 - Write a XAML Markup Extension to Make it Easier!
22:26 - AMAZING PLUGIN ALERT!

🙋‍♂️ Also find my...

#maui #localization #resx #dotnet #dotnetmaui
Рекомендации по теме
Комментарии
Автор

Whoops! Look like I made a little mistake in editing... 🫣 Can you spot where?

jfversluis
Автор

Dank je wel, Gerald!
Click
Thanks, Gerald!

Pevi
Автор

Thank you so much, Gerald! I made all Shell MenuBarItem(s) and MenuFlyoutItem(s) get translated automatically. It works like a charm!

Programmidis
Автор

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

cavanmcsweney
Автор

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.

jewersp
Автор

At last a neat and working solution instead of (Application.Current as App).MainPage = new AppShell();

kaep
Автор

Hi! The way you pronounced @ 6:33 the R is perfect in French 😂😂 Bravo et merci.

marcmognol
Автор

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.

Автор

Thanks, Gerald, I'd definitely be interested in a follow-up video about the plugin mentioned at the end of this already-useful video.

mboz
Автор

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. 🙂

rameezimtiaz
Автор

Thanks Gerald for this. I have a request: can you please make a video on how to create a custom control with Handlers ?

pushanroychowdhury
Автор

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.

andrewtruckle
Автор

why not use MVVM?
How should I write the last 2 methods in LocalizationResourceManager file with MVVM?

hungchip
Автор

Follow up video with what Svensson has done, please!

CliffShivkar
Автор

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

mohammedalsabahii
Автор

How can I managed this with IValueConverter?

infinitezymalny
Автор

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
Автор

Hello Gerald, can you make a video about inApp purchase for android/ios/windows/mac

pr_secrurity
Автор

For those who has a VS compilation error <APT2144 invalid file path>. 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

vitalikdm
Автор

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 ?

its-AliRaza