{"id":14965171,"url":"https://github.com/nepitwin/i18n.avalonia","last_synced_at":"2025-10-24T07:41:44.823Z","repository":{"id":180997945,"uuid":"666049519","full_name":"Nepitwin/I18N.Avalonia","owner":"Nepitwin","description":"Avalonia Internationalizing for ReactiveUi and Prism","archived":false,"fork":false,"pushed_at":"2025-06-02T09:53:30.000Z","size":445,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-06T17:49:43.443Z","etag":null,"topics":["avalonia","avaloniaui","i18n","linux","macos","prism","reactive","windows"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Nepitwin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-13T15:33:12.000Z","updated_at":"2025-08-23T15:19:24.000Z","dependencies_parsed_at":"2024-09-13T23:37:08.358Z","dependency_job_id":"5234ebee-f34a-43b4-9aa7-b1b7e0400de5","html_url":"https://github.com/Nepitwin/I18N.Avalonia","commit_stats":{"total_commits":33,"total_committers":2,"mean_commits":16.5,"dds":0.4545454545454546,"last_synced_commit":"fa1bf5660cf0ee528fa3a4a0571e482ac3b976bc"},"previous_names":["nepitwin/avalonia.prism.i18n","nepitwin/i18n.avalonia"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/Nepitwin/I18N.Avalonia","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nepitwin%2FI18N.Avalonia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nepitwin%2FI18N.Avalonia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nepitwin%2FI18N.Avalonia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nepitwin%2FI18N.Avalonia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Nepitwin","download_url":"https://codeload.github.com/Nepitwin/I18N.Avalonia/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nepitwin%2FI18N.Avalonia/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280761850,"owners_count":26386245,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-24T02:00:06.418Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["avalonia","avaloniaui","i18n","linux","macos","prism","reactive","windows"],"created_at":"2024-09-24T13:34:19.190Z","updated_at":"2025-10-24T07:41:44.818Z","avatar_url":"https://github.com/Nepitwin.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Avalonia Internationalizing\n\n[license]: https://img.shields.io/github/license/Nepitwin/I18N.Avalonia?style=flat-square\n\n[LinuxBuild]: https://github.com/Nepitwin/I18N.Avalonia/actions/workflows/linux.yml/badge.svg?branch=main\n[MacOSBuild]: https://github.com/Nepitwin/I18N.Avalonia/actions/workflows/macos.yml/badge.svg?branch=main\n[WindowsBuild]: https://github.com/Nepitwin/I18N.Avalonia/actions/workflows/windows.yml/badge.svg?branch=main\n\n[NetCore]: https://img.shields.io/badge/NetCore-blue\n[3]: https://img.shields.io/badge/3-Support-blue\n[5]: https://img.shields.io/badge/5-Support-blue\n[6]: https://img.shields.io/badge/6-Support-blue\n[7]: https://img.shields.io/badge/7-Support-blue\n[8]: https://img.shields.io/badge/8-Support-blue\n[9]: https://img.shields.io/badge/9-Support-blue\n\n[Ava-0X]: https://img.shields.io/badge/0.21-Support-green\n[Ava-11]: https://img.shields.io/badge/11-Support-green\n\n[Prism-Example]: https://raw.githubusercontent.com/Nepitwin/I18N.Avalonia/main/assets/Prism.gif\n[Reactive-Example]: https://raw.githubusercontent.com/Nepitwin/I18N.Avalonia/main/assets/ReactiveUi.gif\n\n|                |                                                   |\n|----------------|---------------------------------------------------|\n| License        | ![][license]                                      |\n| Builds         | ![][LinuxBuild] ![][MacOSBuild] ![][WindowsBuild] |\n| .NET Core      | ![][3] ![][5] ![][6] ![][7] ![][8] ![][9]         |\n| Avalonia       | ![][Ava-0X] ![][Ava-11]                           |\n| Core           | [![](https://img.shields.io/nuget/v/I18N.Avalonia.svg)](https://www.nuget.org/packages/I18N.Avalonia) |\n| Prism          | [![](https://img.shields.io/nuget/v/I18N.Avalonia.Prism.svg)](https://www.nuget.org/packages/I18N.Avalonia.Prism) |\n| Reactive       | [![](https://img.shields.io/nuget/v/I18N.Avalonia.ReactiveUi.svg)](https://www.nuget.org/packages/I18N.Avalonia.ReactiveUi) |\n\n| Prism                                        | ReactiveUi                                        |\n|----------------------------------------------|---------------------------------------------------|\n| ![][Prism-Example]  | ![][Reactive-Example] |\n\n# How to use it\n\n## Ressource manager files (.resx)\n\n* Recommended tool to manage resx files is ResXResourceManager\n  *  https://github.com/dotnet/ResXResourceManager\n\n### Prism registration\n\n```dotnet\nprotected override void RegisterTypes(IContainerRegistry containerRegistry)\n{\n    containerRegistry.RegisterInstance\u003cILocalizer\u003e(new Localizer(Properties.Resource.ResourceManager));\n}\n```\n\nInclude prism internationalizing module by .axaml\n\n```\nxmlns:i18N=\"clr-namespace:I18N.Avalonia.Prism;assembly=I18N.Avalonia.Prism\"\n```\n\n### Usage in .axaml\n\n```\n\u003cStackPanel\u003e\n    \u003cTextBlock Text=\"{i18N:PrismLocalization Welcome}\"\n               HorizontalAlignment=\"Center\"\n               VerticalAlignment=\"Center\"\n               Margin=\"0, 24, 0,24\"\n               FontSize=\"17\"\n               FontWeight=\"Heavy\" /\u003e\n\n    \u003cButton Content=\"{i18N:PrismLocalization English}\"\n            Margin=\"0,0,0,8\"\n            Command=\"{Binding SwitchLanguage}\"\n            CommandParameter=\"en\"/\u003e\n\n    \u003cButton Content=\"{i18N:PrismLocalization German}\"\n            Margin=\"0,0,0,8\"\n            Command=\"{Binding SwitchLanguage}\"\n            CommandParameter=\"de\"/\u003e\n\n\u003c/StackPanel\u003e\n```\n\n### ReactiveUi registration (Splat)\n\n```dotnet\npublic override void RegisterServices()\n{\n    base.RegisterServices();\n    Locator.CurrentMutable.RegisterLazySingleton(() =\u003e new Localizer(Properties.Resource.ResourceManager), typeof(ILocalizer));\n}\n```\n\nInclude reactive internatinalizing module by .axaml\n\n```\nxmlns:i18N=\"clr-namespace:I18N.Avalonia.ReactiveUi;assembly=I18N.Avalonia.ReactiveUi\"\n```\n\n### Usage in .axaml\n\n```\n\u003cStackPanel\u003e\n    \u003cTextBlock Text=\"{i18N:ReactiveUiLocalization Welcome}\"\n                HorizontalAlignment=\"Center\"\n                VerticalAlignment=\"Center\"\n                Margin=\"0, 24, 0,24\"\n                FontSize=\"17\"\n                FontWeight=\"Heavy\" /\u003e\n\n    \u003cButton Content=\"{i18N:ReactiveUiLocalization English}\"\n            Margin=\"0,0,0,8\"\n            Command=\"{Binding SwitchLanguage}\"\n            CommandParameter=\"en\"/\u003e\n\n    \u003cButton Content=\"{i18N:ReactiveUiLocalization German}\"\n            Margin=\"0,0,0,8\"\n            Command=\"{Binding SwitchLanguage}\"\n            CommandParameter=\"de\"/\u003e\n\n\u003c/StackPanel\u003e\n```\n\n### Usage in model view\n\n```\npublic LanguageViewModel(ILocalizer i18N)\n{\n    i18N.LanguageChangedNotification += OnLanguageChangedNotification;\n}\n\nprivate void OnLanguageChangedNotification()\n{\n    Console.WriteLine(@\"Change language to\" + _localizer.Language.TwoLetterISOLanguageName);\n    // Your binding can be changed here or notify property changed can be called to refresh\n}\n```\n\n### Language change\n\n* After language is set all binding properties will be automatic refreshed and LanguageChangedNotification is called to refresh bindings.\n\n```\npublic LanguageViewModel(ILocalizer i18N)\n{\n    i18N.Language = new CultureInfo(\"de\");\n}\n```\n\n# Acknowledgment\n\nThanks to Sakya which has written this nice blog to understand this behavior and to build a nuget package with some changes.\n\n-   \u003chttps://www.sakya.it/wordpress/avalonia-ui-framework-localization\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnepitwin%2Fi18n.avalonia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnepitwin%2Fi18n.avalonia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnepitwin%2Fi18n.avalonia/lists"}