localization

Localisation strings not always work having ShareKit in a project

删除回忆录丶 提交于 2020-01-11 11:32:22
问题 since I've removed some localisations from my app, I have this problem: the first time I load my app, I see the localised string of my key in a label. The second time I load the app, the xxxxxkey appears. The next time I load the app, everything is fine again (showing the localized string). How can this be? I would be glad, if anyone could point me in the right direction. I'm on Xcode 4.2. Thanks in advance! 回答1: I experienced this too after adding the ShareKit library to my project. As it

Loading a Localized UIImage

。_饼干妹妹 提交于 2020-01-11 05:23:29
问题 I need to load localized images in my iOS app, but also have to take into account that they might need to be the ...@2x kind. How can I do this? 回答1: Corrected Answer [UIImage imageNamed:@"TestImage"] looks first into Resources, if nothing found, it then looks in the lproj dir folders. So you only need to put the localized images into the right folder. Old Answer NSLocalizedString should do the trick. See Localizing String Resources. UIImage *img = [UIImage imageNamed:NSLocalizedString(@

CurrentUICulture ignores Region and Language settings

懵懂的女人 提交于 2020-01-11 05:11:05
问题 Assorted settings in the Windows 7 Region and Language dialog supply values to the properties of the CurrentCulture object. However, WPF controls seem to use CurrentUICulture instead, resulting in a total failure to respect the user's preferences. On my workstation, for example, WPF controls seem to use CurrentUICulture which is en-US, causing them to display dates with the American format M/d/yyyy rather than the Australia format specified in the Region and Language dialog. Explicitly

Can you access standard Windows strings like 'Cancel'?

北城以北 提交于 2020-01-11 04:28:05
问题 I am building a Windows dialog box that has the standard 'OK' and 'Cancel' buttons. Given that Windows uses the same button text in its own dialogs is there a way for me to grab the correct strings to use on the buttons? This way my application will have the correct strings no matter which language is being used, without me needing to localize it for lots of different languages myself. I am using C# but can happily use platform invoke to access an OS method if needed. NOTE: Yes, I can easily

Android RTL issue in API 24 and higher on locale change

霸气de小男生 提交于 2020-01-11 03:37:36
问题 I was trying to change locale of app at runtime. It is working fine in Andorid below API level 24. But in API level 24 or greater the layout direction is not changing according to locale. Below is the code to change the locale at runtime. I have used LocaleHelper class as below public class LocaleHelper { private static final String SELECTED_LANGUAGE = "Locale.Helper.Selected.Language"; public static Context onAttach(Context context) { String lang = getPersistedData(context, Locale.getDefault

MVC3 edit for decimal fields and localization

我怕爱的太早我们不能终老 提交于 2020-01-10 14:16:34
问题 My locale uses a comma , , and not a dot . for decimal separator. In MVC3, when I open an Edit view where the decimal values are shown with @Html.EditorFor(model => model.MyDecimalVal) the value is shown correctly. When I enter value with comma, I get error "Value is not a number" and if I enter value with dot, I get no error, but actually no value is saved. How to handle this situation? 回答1: Getting around with this by tweaking your validation logic has been already explained so here is a

Strange I18n date output with rails

人走茶凉 提交于 2020-01-10 04:55:10
问题 I've got a strange problem with date translations in my Ruby On Rails 3 application, and I really don't understand why... Here are my en.yml and fr.yml : fr: date: formats: default: "%d/%m/%Y" short: "%e %b" long: "%e %B %Y" time: formats: default: "%d %B %Y %H:%M:%S" short: "%d %b %H:%M" long: "%A %d %B %Y %H:%M" am: 'am' pm: 'pm' en: date: formats: default: "%Y-%m-%d" long: "%B %d, %Y" short: "%b %d" time: am: am formats: default: ! '%a, %d %b %Y %H:%M:%S %z' long: ! '%B %d, %Y %H:%M' short

DATENAME(MONTH,GETADATE()) is returning numeric value of the month as '09'

故事扮演 提交于 2020-01-10 04:28:18
问题 When I run the following query [SELECT DATENAME(MONTH,GETDATE())], ideally speaking it should return value as 'September' but its returning value as '09'. I am running this query on MS SQL Server 2005. Is there anything I need to configure with MS SQL Server 2005? Please find the details of the SQL Server 2005 Component Name Version -------------------------------------------------------------------- Microsoft SQL Server Management Studio 9.00.1399.00 Microsoft Analysis Services Client Tools

Play Store app localization

廉价感情. 提交于 2020-01-10 01:03:09
问题 I'm about to upload my first app to the Google Play store and when I uploaded the APK to the Developer Console, it says under Localizations: default + 55 languages . I don't want my app listed as supporting any of these languages/localizations because it's in English only. What should I do in my app to let Google Play know that the there are no localizations and that the app is in English only? 回答1: This isn't a problem: Google Play does not let users know what languages are supported by your

ASP.NET MVC 3 localized validation messages work on my machine, but not on server

一个人想着一个人 提交于 2020-01-09 11:36:13
问题 I'm using localized validation messages in a ASP.NET MVC 3 form. It correctly generates HTML like <input class="inputlong" data-val="true" data-val-length="Das Feld &quot;Adresse&quot; muss eine Zeichenfolge mit einer maximalen L&#228;nge von 100 sein." data-val-length-max="100" data-val-required="Das Feld &quot;Adresse&quot; ist erforderlich." id="Address" name="Address" type="text" value="" /> This works fine on my machine when I set my CurrentThread to an English, German or Italian