1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-28 06:03:40 +00:00

i18n service

This commit is contained in:
Kyle Spearrin
2019-04-11 15:33:10 -04:00
parent 6a65b6d735
commit 6ee109dc80
11 changed files with 384 additions and 4 deletions

View File

@@ -0,0 +1,29 @@
using Bit.Core.Abstractions;
using Bit.Core.Utilities;
using System;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace Bit.App.Utilities
{
[ContentProperty("Text")]
public class TranslateExtension : IMarkupExtension
{
private II18nService _i18nService;
public TranslateExtension()
{
_i18nService = ServiceContainer.Resolve<II18nService>("i18nService");
}
public string Id { get; set; }
public string P1 { get; set; }
public string P2 { get; set; }
public string P3 { get; set; }
public object ProvideValue(IServiceProvider serviceProvider)
{
return _i18nService.T(Id, P1, P2, P3);
}
}
}