internationalization

How to call EnumSystemLocales in Delphi?

放肆的年华 提交于 2019-12-21 09:19:23
问题 i am trying to call EnumSystemLocales in Delphi. For example: { Called for each supported locale. } function LocalesCallback(Name: PChar): BOOL; stdcall; begin OutputDebugString(Name); Result := Bool(1); //True end; procedure TForm1.Button1Click(Sender: TObject); begin EnumSystemLocales(@LocalesCallback, LCID_SUPPORTED); end; The problem is that the callback is only being called once. Note: EnumSystemLocales is returning true, indicating success. The remarks of EnumSystemLocales says that my

Trouble on using the i18n gem with partial template files

耗尽温柔 提交于 2019-12-21 08:00:11
问题 I am using Ruby on Rails 3.1 and I would like to know how to correctly handle internationalization related to partial template files. That is, ... ... in my app/views/users/flag.html.erb file I have: <%= t('.test_key1') %> <%= render :partial => "/users/flag_form" %> ... in my app/views/users/_flag_form.html.erb file I have: <%= t('.test_key2') %> If in my config/locales/views/users/en.yml file ( note : I am organizing files as stated in the official RoR guide) I use en: users: flag: test

internationalization of dates on the web

て烟熏妆下的殇ゞ 提交于 2019-12-21 07:31:26
问题 Does anyone have any good "architecture" for the internationalization of dates? like in English its Monday, Chinese: 星期一, Dutch: maandag, Japanese: 月曜日 So my first idea is to create some sort of class that stores the strings of Monday to Sunday in 59 different languages. Apparently this isn't scalable at all, imagine now I need to display "12:34 A.M, Monday, 1st Jan 2000" I will then need another translation for A.M, P.M, the months (both long and short forms), the ordinals, etc, etc. It's

internationalization of dates on the web

天大地大妈咪最大 提交于 2019-12-21 07:31:26
问题 Does anyone have any good "architecture" for the internationalization of dates? like in English its Monday, Chinese: 星期一, Dutch: maandag, Japanese: 月曜日 So my first idea is to create some sort of class that stores the strings of Monday to Sunday in 59 different languages. Apparently this isn't scalable at all, imagine now I need to display "12:34 A.M, Monday, 1st Jan 2000" I will then need another translation for A.M, P.M, the months (both long and short forms), the ordinals, etc, etc. It's

How to handle single quotes in internationalization constants?

你说的曾经没有我的故事 提交于 2019-12-21 07:10:31
问题 We define all our internationalized constant strings in a single properties file LocalizableResource_xx.properties (one per language) located in google.gwt.i18n.client . This way it is possible to access the constants in Java code via the constants interface Window.alert(myConstants.helloWorld()); as well as to use them inside the UiBinder .ui.xml <ui:attribute key="some.key" name="text" description="useful info" /> This approach doesn't work well if the string contains a single quote ( ' ).

Magento - Difference between translate.csv and core_translate

Deadly 提交于 2019-12-21 06:04:35
问题 What is the difference between translate.csv translations and the database method via the table core_translate ? 回答1: Here is part of init() method from app/code/core/Mage/Core/Model/Translate.php //Loading data from module translation files foreach ($this->getModulesConfig() as $moduleName=>$info) { $info = $info->asArray(); $this->_loadModuleTranslation($moduleName, $info['files'], $forceReload); } $this->_loadThemeTranslation($forceReload); $this->_loadDbTranslation($forceReload); From it

AWS Cloudfront distribute multilingual angular apps

≡放荡痞女 提交于 2019-12-21 05:45:18
问题 I have an Angular app which is store in a AWS S3 bucket and distributed by Cloudfront. Now I want to distribute my app in multiple languages. I've already translated my angular app and for each language I have on build. So my S3 bucket looks like this: de /index.html /script.js en /index.html /script.js For each language I want to serve another app. In Cloudfront I created two Origins which points to Origin Path /de and /en So my URL schema is like this: <appname>.<mydomain>.com/:lang But my

How are the new unicode domains going to be handled by email regexes?

十年热恋 提交于 2019-12-21 05:29:09
问题 Since In October 2009, the Internet Corporation for Assigned Names and Numbers (ICANN) approved the creation of country code top-level domains (ccTLDs) in the Internet that use the IDNA standard for native language scripts. I'm pretty sure that the standard regexes most sites currently use won't mark these as valid, or am I wrong? Has anyone actually thought about how this would play out or has anyone done anything about it? Hope I'm not jumping the gun here. 回答1: When a user types an

Backbone.js how to i18n value before passing to template

你离开我真会死。 提交于 2019-12-21 05:17:15
问题 Using Backbone.js, Handlebars and Require.js with i18n. I have my en_us.js file with all the string translations, but how do I deal with the case of dynamic values being sent to the template? I know all these strings ahead of time, but hard coding them into the template seems messy, can I pass in a pre-translated string some how? I am using the hbs module for the i18n and templates with require.js. 回答1: I see this problem not related to i18n but to any case where you need render data that

Django: Running site on many languages

↘锁芯ラ 提交于 2019-12-21 05:11:13
问题 I want to run an article site on several languages, I already translated translation strings, so my templates are ready. I only have a questions how to store articles in many languages? Should I create a database for each translation or it works in different way? If I have for example this basic model: class Article(models.Model): models.TextField() And want to store data in many languages, how do I do it? How to organize redirects between one article on different languages 回答1: One simple