1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-05 23:53:33 +00:00
Files
mobile/src/App/Abstractions/Services/ILocalizeService.cs
2016-11-26 10:51:04 -05:00

32 lines
1.1 KiB
C#

using System;
using System.Globalization;
namespace Bit.App.Abstractions
{
/// <summary>
/// Implementations of this interface MUST convert iOS and Android
/// platform-specific locales to a value supported in .NET because
/// ONLY valid .NET cultures can have their RESX resources loaded and used.
/// </summary>
/// <remarks>
/// Lists of valid .NET cultures can be found here:
/// http://www.localeplanet.com/dotnet/
/// http://www.csharp-examples.net/culture-names/
/// You should always test all the locales implemented in your application.
/// </remarks>
public interface ILocalizeService
{
/// <summary>
/// This method must evaluate platform-specific locale settings
/// and convert them (when necessary) to a valid .NET locale.
/// </summary>
CultureInfo GetCurrentCultureInfo();
/// <summary>
/// CurrentCulture and CurrentUICulture must be set in the platform project,
/// because the Thread object can't be accessed in a PCL.
/// </summary>
void SetLocale(CultureInfo ci);
}
}