localization

Asp.Net Core Localized Resource in Separate Assembly

会有一股神秘感。 提交于 2020-06-22 08:07:06
问题 I am trying to use the new Localization features of .NET Core, but outside the simple sample Microsoft has provided here, https://docs.microsoft.com/en-us/aspnet/core/fundamentals/localization#resource-file-naming. I have my Controllers in a separate project, ProjectA.Controllers, while I have a shared resource class in a common project, ProjectB.Localization. I've configured my startup class as prescribed in the docs. I am unclear on what to name my resource file and where exactly to put it.

Android wrong locale resolution for ES-EC language

ⅰ亾dé卋堺 提交于 2020-06-17 09:07:30
问题 I have the next localization in my app: values values-es values-es-rMX When I have locale of the device set to es_EC (Ecuador), I see strings from MX folder! But accordingly to this tutorial, I should see strings from base ES folder (actually, this is the goal). Why is it happening and how can I get correct app behavior? I'm using an emulator with API level 28. 回答1: Okay, the answer is on another StackOverflow question, the reason is the same, this is intended behavior for Android system. 来源:

Strange characters appear when using WPF webbrowser, and HTML with italic tag and arabic text

爱⌒轻易说出口 提交于 2020-06-16 02:40:26
问题 I cannot figure this one but I have made a simple demo below. When this page is viewed in IE or Edge it renders properly. I have tried different encodings like utf-16, Windows-1252 but did not work. Looks like an issue with WebBrowser control to me. Can someone figure this out ? ArabicPage.html <html lang="en" xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> <title></title> </head> <body> <p><i>اتفاقية</i></p> <p>اتفاقية</p> </body> </html> LayoutTest.xaml <Page x:Class=

IE 11 throwing “'timeZone' is outside of valid range” when setting timezone to “Europe/London”

陌路散爱 提交于 2020-06-14 06:52:23
问题 I have some js to get the local time displayed in uk's timezone. var d = new Date(); // local system time (whatever timezone that is) var dUK = new Date(d.toLocaleString('en-GB', { timeZone: 'Europe/London' })); // UK timezone (covers BST too) Works fine in all browsers except IE 11(sigh...) which throws the following error: Option value 'EUROPE/LONDON' for 'timeZone' is outside of valid range. Expected: ['UTC'] Does anybody have any suggestions? See http://jsbin.com/dawaqocuvi/1/edit?html,js

Are there locales or common programs that use YYYY-DD-MM as the date format?

大兔子大兔子 提交于 2020-06-11 17:08:38
问题 I've often standardized on YYYY-MM-DD as the date format for communicating within a geographically distributed project teams to dispel any ambiguity that might arise from local date formats. Is it likely that I might run into people who are used to seeing dates as YYYY-DD-MM ? Are there programs that use this as a date format? 回答1: See "Calendar date" on Wikipedia on the topic - it lists the countries by date/time format. At first glance it doesn't look like anyone is using YYYY-DD-MM

Are there locales or common programs that use YYYY-DD-MM as the date format?

天涯浪子 提交于 2020-06-11 17:06:55
问题 I've often standardized on YYYY-MM-DD as the date format for communicating within a geographically distributed project teams to dispel any ambiguity that might arise from local date formats. Is it likely that I might run into people who are used to seeing dates as YYYY-DD-MM ? Are there programs that use this as a date format? 回答1: See "Calendar date" on Wikipedia on the topic - it lists the countries by date/time format. At first glance it doesn't look like anyone is using YYYY-DD-MM

Enum in WPF ComboxBox with localized names

六月ゝ 毕业季﹏ 提交于 2020-06-09 11:58:25
问题 I have a ComboBox listing an Enum. enum StatusEnum { Open = 1, Closed = 2, InProgress = 3 } <ComboBox ItemsSource="{Binding StatusList}" SelectedItem="{Binding SelectedStatus}" /> I want to display localized names for the enum values in English Open Closed In Progress but also in German (and other languages in the future) Offen Geschlossen In Arbeit In my ViewModel using public IEnumerable<StatusEnum> StatusList { get { return Enum.GetValues(typeof(StatusEnum)).Cast<StatusEnum>(); } } only

Localization using single resource file for Views in Asp .Net Core 3.1

假装没事ソ 提交于 2020-06-09 05:21:32
问题 I am working on localization and I want to create a global resource file for all the strings for all views. I created resource files for model, controller and view but I need a global type of resource file that can store key value pair for Views. I don't don't know how to achieve this and where should I store my global resource file? Should I store it in models or services or in controllers? 来源: https://stackoverflow.com/questions/61752576/localization-using-single-resource-file-for-views-in

Localization using single resource file for Views in Asp .Net Core 3.1

南楼画角 提交于 2020-06-09 05:21:31
问题 I am working on localization and I want to create a global resource file for all the strings for all views. I created resource files for model, controller and view but I need a global type of resource file that can store key value pair for Views. I don't don't know how to achieve this and where should I store my global resource file? Should I store it in models or services or in controllers? 来源: https://stackoverflow.com/questions/61752576/localization-using-single-resource-file-for-views-in

Call reference for country in GeoLite2 using PHP

余生长醉 提交于 2020-06-08 06:24:42
问题 I'm trying to use the free MaxMind GeoLite2 code to be able to determine the country of a specific IP address. I am using the Composer-free method that was posted here: Get a localized name of the users city via Maxmind GeoLite2 Free I'm sure its incredibly simple, but I can't figure out how to actually pass an IP address and have it return the country. After the $reader = new Reader... line I have $place = $reader->country('##.###.##.###'); (where the #'s are actual IP address numbers) and