mirror of
https://github.com/bitwarden/android.git
synced 2024-12-24 18:08:26 +03:00
locale string comparer for i18n service
This commit is contained in:
parent
d1c696bad5
commit
803527f585
1 changed files with 12 additions and 0 deletions
|
@ -17,6 +17,7 @@ namespace Bit.App.Services
|
|||
|
||||
private readonly CultureInfo _defaultCulture = new CultureInfo("en-US");
|
||||
private bool _inited;
|
||||
private StringComparer _stringComparer;
|
||||
|
||||
public MobileI18nService(CultureInfo systemCulture)
|
||||
{
|
||||
|
@ -24,6 +25,17 @@ namespace Bit.App.Services
|
|||
}
|
||||
|
||||
public CultureInfo Culture { get; set; }
|
||||
public StringComparer StringComparer
|
||||
{
|
||||
get
|
||||
{
|
||||
if(_stringComparer == null)
|
||||
{
|
||||
_stringComparer = StringComparer.Create(Culture, false);
|
||||
}
|
||||
return _stringComparer;
|
||||
}
|
||||
}
|
||||
|
||||
public void Init(CultureInfo culture = null)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue