internationalization

Ember: dynamic switch to chosen language (using i18n library)

梦想与她 提交于 2019-12-03 12:43:01
问题 I am using the ember-i18n library for translation of static strings used throughout my application. As the language files are rather big, I do not want to load at application start all possible language dictionaries. I thus want to load the dictionary dynamically when the user chooses to change language. I have made a first implementation that works rather well. See http://jsfiddle.net/cyclomarc/RYbNG/7/ When starting the app, it is rendered in english. You can now select one of the views

Translating Rails Timezones

て烟熏妆下的殇ゞ 提交于 2019-12-03 12:36:46
问题 We internationalized our site months ago, but forgot one part: The drop down where a user picks their timezone. How do you translate the following line: = f.time_zone_select :timezone, ActiveSupport::TimeZone.all 回答1: I've come across the same problem. However, when I was trying to implement Peter's solution, a simpler solution occurred to me. The time_zone_select helper takes a :model option, which defaults to ActiveSupport::TimeZone . According to the API documentation, all this model has

Flip UIImageViews for Right to Left Languages

安稳与你 提交于 2019-12-03 12:35:24
iOS automatically flips the entire ViewController when using a RTL language like Arabic and does a great job with most of the layout, especially text. The default behavior is to flip the layout but leave UIImageViews the same orientation (since you generally don't want to reverse images). Is there a way to specify that some images should be flipped (such as arrows) when the phone is set to a RTL language? iOS 9 includes the imageFlippedForRightToLeftLayoutDirection method that you can use, that automatically flips the image in a UIImageView when in an RTL localization. Nikos M. You have to

Ruby On Rails: pluralize for other languages

让人想犯罪 __ 提交于 2019-12-03 12:31:22
I am building apps for a non-english audience. Right now, I use english nouns to name my models, yet I prefer to use native dutch ones. As the convention uses the plural of the class name for tables, I assume it is the pluralize method inside Rails (where it resides, I wouldn't know). How can I change the pluralize method and where is it located? Would this break Rails? I am using Rails 2.3.5 and Ruby 1.8.7 Example: The Book class becomes books now. My Boek class becomes boeks , but it is grammatically correct to use boeken Christian Lescuyer Add your rules to an inflections.rb file in config

iOS Get localized version of a string for a specific language

梦想的初衷 提交于 2019-12-03 12:27:26
I'm building an application for iOS that will be available in both English and French languages. I've read some tutorials around internationalization and I have an understanding of how it works and what I need to do. The problem I'm having is there is a specific case where I want to load French strings for an English user. I understand it's possible to set the language for the entire application, but that it requires the application to be restarted before it will take affect. I'd like to avoid this, and instead be able to pick to load French or English strings on demand. Is it possible to load

Rails i18n and routes in javascript

久未见 提交于 2019-12-03 12:19:23
Sometimes it would be really handy to have the Rails localization files available in JavaScript. Same is true for for the routes helpers. I found these two plugins which are exactly doing this: Exposing i18n to JavaScript: http://github.com/fnando/i18n-js Rails Routes in JavaScript: http://tore.darell.no/pages/javascript_routes My questions: Are there any other plugins / gems doing similar things like the two above? What's the right approach in Rails? Meta tag? Additional data- attributes? Thanks for any input! I use the first plugin you listed (i18n-js) and recommend it highly. It does

How does tokenization and pattern matching work in Chinese.?

风流意气都作罢 提交于 2019-12-03 12:11:20
This question involves computing as well as knowledge of Chinese. I have chinese queries and I have a separate list of phrases in Chinese I need to be able to find which of these queries have any of these phrases. In english, it is a very simple task. I don't understand Chinese at all, its semantics, grammar rules etc. and if somebody in this forum who also understands Chinese can help me with some basic understanding and how pattern matching is done for Chinese. I have a basic perception that in Chinese one unit (without any space in between) can actually mean more than one word(Is this

Is there an i18n (Intl) shim for JavaScript?

别等时光非礼了梦想. 提交于 2019-12-03 12:06:20
问题 I am looking for a shim for the ECMAScript Internationalization API. Does anyone know of such a project? (Even if it's still currently a work-in-progress.) 回答1: Yes, there's a polyfill for ECMA-402 (aka ECMA Internationalization API Specification) available at https://github.com/andyearnshaw/Intl.js. For use in Node.js applications, you can install with NPM: npm install intl It's also available as a Bower component for the front-end: bower install intl There's support for NumberFormat and

Internationalization in MFC

允我心安 提交于 2019-12-03 11:52:40
It's finally (after years of postponing) the time to localize my app in a few other languages other than English. The first challenge is to design the integration into my C++ / MFC application that has dozens of dialogs and countless strings. I came across two possible alternative implementations: Compile and deploy localized resource files as DLLs Extract and replace all strings with the localized version. For each language there will be an XML (or simple text) file. Personally I opt for the second alternative since it seems to me more flexible. The changes are many but not hard to make, and

Are there any updates of localization support in C++0x?

旧时模样 提交于 2019-12-03 11:30:12
The more I work with C++ locale facets, more I understand --- they are broken. std::time_get -- is not symmetric with std::time_put (as it in C strftime/strptime) and does not allow easy parsing of times with AM/PM marks. I discovered recently that simple number formatting may produce illegal UTF-8 under certain locales (like ru_RU.UTF-8 ). std::ctype is very simplistic assuming that to upper/to lower can be done on per-character base (case conversion may change number of characters and it is context dependent). std::collate -- does not support collation strength (case sensitive or insensitive