未验证 提交 258d388a 编写于 作者: C Carl de Billy 提交者: GitHub

Merge pull request #11897 from unoplatform/dev/cdb/bugs/ios-datepicker-display

Fixed ApplicationLanguages initialization on iOS
using System.Collections.Generic;
using System.Linq;
using Foundation;
namespace Windows.Globalization
{
public static partial class ApplicationLanguages
{
public static IReadOnlyList<string> ManifestLanguages { get; } = NSBundle.MainBundle.PreferredLocalizations.Concat(NSBundle.MainBundle.Localizations).Distinct().ToArray();
public static IReadOnlyList<string> ManifestLanguages { get; } = GetManifestLanguages();
private static string[] GetManifestLanguages()
{
var manifestLanguages = global::Foundation.NSLocale.PreferredLanguages
.Concat(global::Foundation.NSBundle.MainBundle.PreferredLocalizations)
.Concat(global::Foundation.NSBundle.MainBundle.Localizations)
.Distinct()
.ToArray();
return manifestLanguages;
}
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册