Reader small image

You're reading from  .NET MAUI Cross-Platform Application Development - Second Edition

Product typeBook
Published inMar 2024
Reading LevelBeginner
PublisherPackt
ISBN-139781835080597
Edition2nd Edition
Languages
Right arrow
Author (1)
Roger Ye
Roger Ye
author image
Roger Ye

Roger Ye is an embedded system programmer who has great interest in virtualization, Android, and cross-platform technologies. His professional experience includes working with major companies like Motorola, Emerson, Intel, and EPAM, where he held the position of Engineering Manager. At Motorola and Emerson, he worked on embedded system projects for mobile devices and telecommunication infrastructures. He is now an engineering manager at EPAM, working with a team to deliver digital solutions for diverse clients.
Read more about Roger Ye

Right arrow

Supporting multiple languages – localization

To accommodate multiple languages, we can utilize the .NET built-in mechanism for localizing applications. In .NET, resources files can be used to support localization by consolidating all text and other resources required for an application’s user interface in one location. In a XAML file, we can use the x:Static markup extension to access the string defined in resources files.

Creating a .resx file

We can generate a resources file for each supported language. Resources files are XML files with a .resx extension, which are compiled into binary resources files during the build process. To add a resources file, right-click the project node and select Add > New Item... > Resources File, as shown in Figure 3.9:

Figure 3.7: Creating a Resources File

Figure 3.9: Creating a resources file

We can create the Resources.resx resources file in the Properties folder.

To support different cultures, we can add additional resources files with cultural...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
.NET MAUI Cross-Platform Application Development - Second Edition
Published in: Mar 2024Publisher: PacktISBN-13: 9781835080597

Author (1)

author image
Roger Ye

Roger Ye is an embedded system programmer who has great interest in virtualization, Android, and cross-platform technologies. His professional experience includes working with major companies like Motorola, Emerson, Intel, and EPAM, where he held the position of Engineering Manager. At Motorola and Emerson, he worked on embedded system projects for mobile devices and telecommunication infrastructures. He is now an engineering manager at EPAM, working with a team to deliver digital solutions for diverse clients.
Read more about Roger Ye