How to localize the images in Images.xcassets?

If you are using an Asset Catalog: Asset catalog elements are now localizable. In the information panel for an asset, there is a “Localization” section that lists all the languages you’ve set up for your project in the project settings. If you don’t select any of them, your images will be deemed “universal” (i.e., they … Read more

Enum localization

You can implement a description attribute. public class LocalizedDescriptionAttribute : DescriptionAttribute { private readonly string _resourceKey; private readonly ResourceManager _resource; public LocalizedDescriptionAttribute(string resourceKey, Type resourceType) { _resource = new ResourceManager(resourceType); _resourceKey = resourceKey; } public override string Description { get { string displayName = _resource.GetString(_resourceKey); return string.IsNullOrEmpty(displayName) ? string.Format(“[[{0}]]”, _resourceKey) : displayName; } } } … Read more

Angular js support for localization [closed]

Take a look at angular-translate: https://github.com/angular-translate/angular-translate for all DIY folks: You can find localized files for angular: here These files will help you with the build-in angular filters: date, currency and number. Amazing… so far. Now you want to use your own texts, than all you need is the power of angular.js dependency injection. Create … Read more

iOS: Determine if device language is Right to Left (RTL)

In iOS 9 one can determine the current direction for each individual view. if #available(iOS 9.0, *) { if UIView.userInterfaceLayoutDirection( for: myView.semanticContentAttribute) == .rightToLeft { // The view is shown in right-to-left mode right now. } } else { // Use the previous technique if UIApplication.shared.userInterfaceLayoutDirection == .rightToLeft { // The app is in right-to-left … Read more

Find all source hardcoded strings

ReSharper 5 is obvious a choice, but many tips must be set so as to achieve your goals, Turn on solution wide analysis. Go to ReSharper|Options|Code Inspection|Inspection Severity|Potential Code Quality Issues|Element is localizable set to Show as error. Go back to Solution Explorer and click on the project (csproj). In Properties panel under ReSharper category, … Read more

jQuery Datepicker localization

That code should work, but you need to include the localization in your page (it isn’t included by default). Try putting this in your <head> tag, somewhere after you include jQuery and jQueryUI: <script type=”text/javascript” src=”https://raw.githubusercontent.com/jquery/jquery-ui/master/ui/i18n/datepicker-fr.js”> </script> I can’t find where this is documented on the jQueryUI site, but if you view the source of … Read more