internationalization

How to make i18n with Handlebars.js (mustache templates)?

孤街浪徒 提交于 2019-12-20 08:26:12
问题 I'm currently using Handlebars.js (associated with Backbone and jQuery) to make a web app almost totally client side rendered, and I'm having issues with the internationalisation of this app. How can I make this work? Are there any plugins? 回答1: I know this has been answered, but I'd like to share my simple solution. To build on Gazler's solution using I18n.js (which we use with our project at work), I just used a very simple Handlebars helper to facilitate the process to do the localization

Locale codes for iPhone lproj folders

这一生的挚爱 提交于 2019-12-20 08:03:26
问题 Where would I find a list of locale name abbreviations for my project localization folders? (Such as en for English, fr for French). I am looking to do German, Spanish and others. 回答1: You can just call them English.lproj , Spanish.lproj , etc. The "abbreviated names" are actually IETF language tags (i.e. BCP 47), except that you use pt_PT.lproj instead of pt-PT.lproj . The actual interpretation routine is in https://github.com/apple/swift-corelibs-foundation/blob/master/CoreFoundation/PlugIn

What is the actual differences between I18n/L10n/G11n and specifically what does each mean for development? [duplicate]

人走茶凉 提交于 2019-12-20 08:01:31
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Localization and internationalization, what’s the difference? I18n/L10n/G11n all equal localization to me, but people keep making distinctions among these, especially in corporate and marketing, but I'm failing to see how these 3 tasks, from the programmer's point of view aren't the same thing, are there special requirements behind each one of these? What is some honest programmer to programmer explanations of

internationalization of an iPhone Application

老子叫甜甜 提交于 2019-12-20 07:26:27
问题 I am new to iPhone App development (I am using XCode 4.2) and I was wondering if there is a way to translate all the strings , caption etc ... internally without having to translate them one by one . an idea I have in mind is to use NSUserDefaults to save the language as a global variable and translate everything accordingly another option is to make a look up table (is it even possible in Objective-C ?) Thanks 回答1: You can use NSLocalizedString(@"<#key#>", @"<#comment#>") and one file (named

Chinese characters are rendering in bold

送分小仙女□ 提交于 2019-12-20 07:13:31
问题 Silverlight renders few Chinese characters as Bold in a text box. This textbox has no font family set on it. Please refer to the following screenshot In the above screenshot, first character is bolder than the other. One of the MSDN posts says that this is because of the font family problem and setting SimSun font family should fix the problem. Here is the screenshot after the applying the font family. It looks like setting SimSun is actually fixing the issue. But I am not sure if this is the

Tutorial: solution for node.js / Polymer i18n based on L20n library

荒凉一梦 提交于 2019-12-20 07:04:16
问题 There is a rather usual problem to implement i18n in node.js web project. The problem seems even worse if you want to: use web components (like Polymer) use single translation file for server-side and client-side files translate some items programmaticaly (like dynamically created strings) Thanks to brand-new L20n library developed by Mozilla team this problem can be solved rather easily. 回答1: Project structure First I created a project structure, that would keep my files separatedly, grouped

Modify DOM elements outside root component

那年仲夏 提交于 2019-12-20 06:11:06
问题 My Angular 2 app is structured something like this: <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <base href="/" /> <script src="jspm_packages/system.js"></script> <script src="config.js"></script> <script> System.import('client/main.js'); </script> </head> <body> <my-app></my-app> </body> </html> The root component is the my-app component. I would like to modify the html element which is outside the root component template to add some attributes to it. Is this possible? In my case,

PHP gettext() in Norwegian

。_饼干妹妹 提交于 2019-12-20 06:08:40
问题 I'm using PHP's gettext() for simply transform a website to an other language. The solution worked fine (English/Hungarian) until now because i need to add a Norwegian translation to a new site. When i set the Norwegian locale with setlocale(LC_ALL, "nb_NO.ISO8859-1"); gettext() only returns the base string not the translated one. Is this related with my operating systems' installed locales ( en_US.UTF-8, hu_HU.UTF-8 ) so i need to add the Norwegian one too or something else causing this?

Why when retrieving a string from the ResourceBundle.getBundle, incomprehensible characters

南楼画角 提交于 2019-12-20 05:58:36
问题 Please tell me how to solve this problem: Locale locale = new Locale(language); ResourceBundle messages = ResourceBundle.getBundle("i18n.messages", locale, utf8Control); try { String message = new String(messages.getString(key).getBytes("ISO-8859-1"), "UTF-8"); pageContext.getOut().write(message); } catch (IOException e) { e.printStackTrace(); } I'm trying to implement localization, I get the text from the created messages file, the problem is that instead of the necessary characters, it

What are the i18n message ids for field infos and errors?

江枫思渺然 提交于 2019-12-20 05:15:31
问题 I'd like to translate the default constraints and error messages for markup generated by the views.html.helpers._ inputs. I couldn't find it in the documentation, and have already started browsing the code, but if anyone is faster than me please answer and be awarded. Here is the sample template code: @inputText(regForm("Login"), 'id-> "username", 'placeholder -> "Login", 'required -> "yes", 'autofocus -> "yes") And here is the generated HTML: <div id="username_field" class="error clearfix">