diff --git a/src/Ryujinx.Ava/Common/Locale/LocaleManager.cs b/src/Ryujinx.Ava/Common/Locale/LocaleManager.cs index 64f3a7e86c..0e613838d6 100644 --- a/src/Ryujinx.Ava/Common/Locale/LocaleManager.cs +++ b/src/Ryujinx.Ava/Common/Locale/LocaleManager.cs @@ -16,8 +16,10 @@ namespace Ryujinx.Ava.Common.Locale private readonly Dictionary _localeStrings; private Dictionary _localeDefaultStrings; private readonly ConcurrentDictionary _dynamicValues; + private string _localeLanguageCode; public static LocaleManager Instance { get; } = new(); + public event Action LocaleChanged; public LocaleManager() { @@ -104,6 +106,15 @@ namespace Ryujinx.Ava.Common.Locale } } + public bool IsRTL() + { + return _localeLanguageCode switch + { + "he_IL" => true, + _ => false + }; + } + public string UpdateAndGetDynamicValue(LocaleKeys key, params object[] values) { _dynamicValues[key] = values; @@ -124,6 +135,9 @@ namespace Ryujinx.Ava.Common.Locale { this[item.Key] = item.Value; } + + _localeLanguageCode = languageCode; + LocaleChanged?.Invoke(); } private static Dictionary LoadJsonLanguage(string languageCode = DefaultLanguageCode) diff --git a/src/Ryujinx.Ava/Ryujinx.Ava.csproj b/src/Ryujinx.Ava/Ryujinx.Ava.csproj index 054a5c7f77..b6d37a2f1a 100644 --- a/src/Ryujinx.Ava/Ryujinx.Ava.csproj +++ b/src/Ryujinx.Ava/Ryujinx.Ava.csproj @@ -119,6 +119,7 @@ + @@ -143,6 +144,7 @@ + diff --git a/src/Ryujinx.Ava/UI/Controls/ApplicationListView.axaml b/src/Ryujinx.Ava/UI/Controls/ApplicationListView.axaml index 9004f7518d..fecf088835 100644 --- a/src/Ryujinx.Ava/UI/Controls/ApplicationListView.axaml +++ b/src/Ryujinx.Ava/UI/Controls/ApplicationListView.axaml @@ -86,17 +86,17 @@ HorizontalAlignment="Stretch" FontWeight="Bold" Text="{Binding TitleName}" - TextAlignment="Left" + TextAlignment="Start" TextWrapping="Wrap" /> @@ -110,12 +110,12 @@ - \ No newline at end of file + diff --git a/src/Ryujinx.Ava/UI/Views/Input/ControllerInputView.axaml b/src/Ryujinx.Ava/UI/Views/Input/ControllerInputView.axaml index d636873a3a..99f2b6b694 100644 --- a/src/Ryujinx.Ava/UI/Views/Input/ControllerInputView.axaml +++ b/src/Ryujinx.Ava/UI/Views/Input/ControllerInputView.axaml @@ -101,7 +101,7 @@ HorizontalAlignment="Stretch" VerticalAlignment="Center" SelectedIndex="0" - ItemsSource="{Binding ProfilesList}" + ItemsSource="{Binding ProfilesList}" Text="{Binding ProfileName, Mode=TwoWay}" /> diff --git a/src/Ryujinx.Ava/UI/Windows/AmiiboWindow.axaml b/src/Ryujinx.Ava/UI/Windows/AmiiboWindow.axaml index caf7c1f3ff..c587aa8733 100644 --- a/src/Ryujinx.Ava/UI/Windows/AmiiboWindow.axaml +++ b/src/Ryujinx.Ava/UI/Windows/AmiiboWindow.axaml @@ -72,4 +72,4 @@ Click="CancelButton_Click" /> - \ No newline at end of file + diff --git a/src/Ryujinx.Ava/UI/Windows/MainWindow.axaml b/src/Ryujinx.Ava/UI/Windows/MainWindow.axaml index 0d9a594992..4def7c281b 100644 --- a/src/Ryujinx.Ava/UI/Windows/MainWindow.axaml +++ b/src/Ryujinx.Ava/UI/Windows/MainWindow.axaml @@ -158,7 +158,7 @@ FontWeight="Bold" IsVisible="{Binding ShowLoadProgress}" Text="{Binding LoadHeading}" - TextAlignment="Left" + TextAlignment="Start" TextWrapping="Wrap" MaxWidth="500" /> @@ -202,4 +202,4 @@ Grid.Row="2" /> - \ No newline at end of file + diff --git a/src/Ryujinx.Ava/UI/Windows/SettingsWindow.axaml b/src/Ryujinx.Ava/UI/Windows/SettingsWindow.axaml index a0a75f611c..40cac90ddc 100644 --- a/src/Ryujinx.Ava/UI/Windows/SettingsWindow.axaml +++ b/src/Ryujinx.Ava/UI/Windows/SettingsWindow.axaml @@ -101,6 +101,9 @@ + - \ No newline at end of file +