xamarin / xamarin-macios

.NET for iOS, Mac Catalyst, macOS, and tvOS provide open-source bindings of the Apple SDKs for use with .NET managed languages such as C#
Other
2.42k stars 507 forks source link

Ios Maui sample app uses Chinese Simplified when Chinese Traditional is set in phone preferences #20626

Closed PureWeen closed 1 month ago

PureWeen commented 1 month ago

Issue moved from dotnet/runtime#102560


From @Czapek83 on Tuesday, May 21, 2024 11:12:47 AM

Description

Created new maui project. Created Strings.resx, Strings.zh.resx, Strings.zh-Hans.resx, and Strings.zh-Hant.resx files with below values of SampleText: image

On MainPage.xaml added label that will display proper text according to current language: image

And now, when setting Iphone Region to "China mainland" and language to "Chinese Traditional", the SampleText is taken from Chinese, Simplified, but should be taken from Chinese, Traditional: image

Steps to Reproduce

  1. Create new maui project.
  2. Create localized strings in Resources (Strings.zh-Hans.resx for Chinese Simplified and Strings.zh-Hant for Chinese Traditional) with different strings in it.
  3. Use localized string in one of your screens
  4. Change your Iphone region to "China mainland" and language to "Chinese Traditional".
  5. Run your application and you can see that Chinese Simplified string is used.

Link to public reproduction project repository

https://github.com/Czapek83/Chinese_LanguageIssue

Version with bug

8.0.21 SR4.1

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

IOS 16.7.7, IOS 17.4.1

Did you find any workaround?

Unfortunatelly, not at all.

Relevant log output

No response

PureWeen commented 1 month ago

Issue moved from dotnet/runtime#102560


From @github-actions[bot] on Tuesday, May 21, 2024 11:13:11 AM

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

rolfbjarne commented 1 month ago

This is a problem for dotnet/runtime, so I moved the original dotnet/maui issue there.