mirror of
https://gitcode.com/gh_mirrors/se/Semi.Avalonia
synced 2026-04-04 16:16:34 +08:00
Added spanish locale (#560)
* Added spanish locale * fixed resource directory name * Added spanish locale to demo * using spanish local name
This commit is contained in:
@@ -114,6 +114,12 @@ public partial class MainViewModel : ObservableObject
|
||||
Command = SelectLocaleCommand,
|
||||
CommandParameter = new CultureInfo("de-de")
|
||||
},
|
||||
new MenuItemViewModel
|
||||
{
|
||||
Header = "Español",
|
||||
Command = SelectLocaleCommand,
|
||||
CommandParameter = new CultureInfo("es-es")
|
||||
},
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
27
src/Semi.Avalonia/Locale/es-es.axaml
Normal file
27
src/Semi.Avalonia/Locale/es-es.axaml
Normal file
@@ -0,0 +1,27 @@
|
||||
<ResourceDictionary
|
||||
x:Class="Semi.Avalonia.Locale.es_es"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<!-- DatePicker -->
|
||||
<x:String x:Key="STRING_DATEPICKER_DAY_TEXT">dia</x:String>
|
||||
<x:String x:Key="STRING_DATEPICKER_MONTH_TEXT">mes</x:String>
|
||||
<x:String x:Key="STRING_DATEPICKER_YEAR_TEXT">año</x:String>
|
||||
<!-- TimePicker -->
|
||||
<x:String x:Key="STRING_TIMEPICKER_HOUR_TEXT">hora</x:String>
|
||||
<x:String x:Key="STRING_TIMEPICKER_MINUTE_TEXT">minuto</x:String>
|
||||
<x:String x:Key="STRING_TIMEPICKER_SECOND_TEXT">segundo</x:String>
|
||||
<!-- TextBox/SelectableTextBox flyout -->
|
||||
<x:String x:Key="STRING_MENU_CUT">Cortar</x:String>
|
||||
<x:String x:Key="STRING_MENU_COPY">Copiar</x:String>
|
||||
<x:String x:Key="STRING_MENU_PASTE">Pegar</x:String>
|
||||
<!-- ManagedFileChooser -->
|
||||
<x:String x:Key="STRING_CHOOSER_FILE_NAME">Nombre de fichero</x:String>
|
||||
<x:String x:Key="STRING_CHOOSER_SHOW_HIDDEN_FILES">Mostrar ficheros ocultos</x:String>
|
||||
<x:String x:Key="STRING_CHOOSER_DIALOG_OK">OK</x:String>
|
||||
<x:String x:Key="STRING_CHOOSER_DIALOG_CANCEL">Cancelar</x:String>
|
||||
<x:String x:Key="STRING_CHOOSER_NAME_COLUMN">Nombre</x:String>
|
||||
<x:String x:Key="STRING_CHOOSER_DATEMODIFIED_COLUMN">Fecha modificada</x:String>
|
||||
<x:String x:Key="STRING_CHOOSER_TYPE_COLUMN">Tipo</x:String>
|
||||
<x:String x:Key="STRING_CHOOSER_SIZE_COLUMN">Tamaño</x:String>
|
||||
<x:String x:Key="STRING_CHOOSER_PROMPT_FILE_ALREADY_EXISTS">{0} ya existe. Quieres reemplazarlo?</x:String>
|
||||
</ResourceDictionary>
|
||||
8
src/Semi.Avalonia/Locale/es-es.axaml.cs
Normal file
8
src/Semi.Avalonia/Locale/es-es.axaml.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace Semi.Avalonia.Locale;
|
||||
|
||||
public class es_es: ResourceDictionary
|
||||
{
|
||||
|
||||
}
|
||||
@@ -20,6 +20,7 @@ public class SemiTheme : Styles
|
||||
{ new CultureInfo("ru-ru"), new ru_ru() },
|
||||
{ new CultureInfo("zh-tw"), new zh_tw() },
|
||||
{ new CultureInfo("de-de"), new de_de() },
|
||||
{ new CultureInfo("es-es"), new es_es() },
|
||||
};
|
||||
|
||||
private static readonly ResourceDictionary _defaultResource = new zh_cn();
|
||||
|
||||
Reference in New Issue
Block a user