internationalization

`scope` around `mount` ineffective?

痞子三分冷 提交于 2019-12-11 02:31:46
问题 (While this discusses Blacklight engine, I believe the question is actually purely about Rails.) I am trying to add internationalisation to my Blacklight app. To that end, I wrapped everything in config/routes.rb into scope "(:locale)", locale: /en|ja/ , and in app/controllers/application_controller.rb I added before_action :set_locale and overrode default_url_options as suggested by Rails i18n guide. Most things work, but there's one thing I haven't been able to figure out. All of my

Display equivalent of “MMM d, yyyy” in current culture info

浪子不回头ぞ 提交于 2019-12-11 01:43:06
问题 I've perused the standard datetime formatters that C# offers, and I can't seem to find one that matches my "short date" requirement: "May 4, 2013". I know that I can do a custom format string to accomplish the goal: myDateTimeOffset.ToString("MMM d, yyyy"); However, this application may go to other countries. Is there a way to get the current culture's equivalent to a particular format string? myDateTimeOffset.ToString("MMM d, yyyy", CultureInfo.CurrentUICulture); And have it adapt to an

GXT 2.2 - MessageBox button constants

ぐ巨炮叔叔 提交于 2019-12-11 01:35:42
问题 This is a question on how to detect which button was clicked in the MessageBox/Dialog. GXT 2.1 or 2.2 only. Please do not answer using GXT 3. Ideally, this is how I could do a confirm dialog. final MessageBox box = MessageBox.confirm( "Confirm kill avatar", "Please remove " + getAvatar().getName(), new Listener<MessageBoxEvent>() { @Override public void handleEvent(MessageBoxEvent be) { Button clicked = be.getButtonClicked(); if (clicked == box.getDialog().getButtonById("yes")) deleteAvatar()

haml, link_to helper, and I18n in the same sentence

给你一囗甜甜゛ 提交于 2019-12-11 01:28:40
问题 Here is the markup I'm trying to get: <p>View more <a href="/clinics/integratedclinic">clinic information</a> including physicians, locations, directions, documents, and more.</p> I'm using haml, yaml, and Rails (oh my!). In order to do this with localization, I have to have this yaml: en: view_more: View more link: clinic information details: including physicians, locations, directions, documents, and more. And put my haml on 3 lines like: %p = I18n.t('view_more') = link_to I18n.t('link'),

Why doesn't explicit COLLATE override database collation?

南楼画角 提交于 2019-12-11 01:28:25
问题 I am on SQL Server 2008 R2 dev, server default collation is Cyrillic_General_CI_AS Executing in SSMS SELECT 'éÉâÂàÀëËçæà' COLLATE Latin1_General_CS_AS or SELECT 'éÉâÂàÀëËçæà' COLLATE Latin1_General_CI_AI outputs eEaAaAeEc?a on(in ocntext of/use dbName) of database with default collation Cyrillic_General_CI_AS éÉâÂàÀëËçæà on database with default collation Latin1_General_CI_AS Why? 回答1: Those character literals in your queries are first converted to varchar strings under whatever collation the

What products support 3-digit region subtags, e.g., es-419 for Latin-American Spanish?

旧巷老猫 提交于 2019-12-11 01:27:17
问题 What products support 3-digit region subtags, e.g., es-419 for Latin-American Spanish? Are web browsers, translation tools and translators familiar with these numeric codes in addition to the more common "es" or "es-ES"? I've already visited the following pages: W3C Choosing a Language Tag W3C Language tags in HTML and XML RFC 5646 Tags for Identifying Languages Microsoft National Language Support (NLS) API Reference 回答1: I doubt that many products like that exist. It seems that some main

dynamic translation/translation with variable with i18next

天大地大妈咪最大 提交于 2019-12-11 01:22:19
问题 How come I can't translate dynamically resp. using a variable with i18next? For example in my JS-file I got this: Here I use a variable and assign it to the i18n function and it doesn't work: //this does not work: var dynamicTranslation = "myText.toBetranslated"; console.log("translation dynamic ", !{JSON.stringify(t(dynamicTranslation))}); Here I hardcoded the string from above directly into the i18n function and it does work: //inserted string is the same string as in dynamic translation

Base Internationalization and “Could not find a storyboard named […]”

这一生的挚爱 提交于 2019-12-11 01:11:42
问题 I am using iOS 6 and trying to use base internationalization. But when I flip the switch and run, I get a "Could not find a storyboard named […]" exception. I tried removing and adding the storyboard file both from the build phases and from the project itself to no avail. I notice in the build phases, that the storyboard is there but it is red. Is there a trick to get this working? 回答1: Select the red storyboard entry in your project navigation, go to the file inspector use the button beside

PostgreSQL: Can one define a session variable with the language and use it in views?

折月煮酒 提交于 2019-12-11 00:26:23
问题 Here's a simplified example of schema: Table l10n ( l10n_id SMALLINT, code VARCHAR(5) ) Table product ( product_id INT, ..language-neutral columns.. ) Table product_l10n ( product_id INT, l10n_id SMALLINT, ..language-specific columns.. ) Querying for products with localized data is done like this: SELECT * FROM product a LEFT JOIN product_l10n b ON b.id = a.id LEFT JOIN l10n c ON c.id = b.id WHERE c.code = 'en-US'; To avoid that big fat query, I would like to use views. The basic idea is to

Spanish language chars are not displayed properly?

拟墨画扇 提交于 2019-12-11 00:03:50
问题 I am using GWT. i implemented internationalization to support spanish language. but spanish chars are not displayed propertly. Ex: Teléfono Buscar is displayed as . (see some junk char after Tel). i am using IE browser. Do i need to configure any further settings? Thanks! 回答1: I suspect this may be due to the fact that your editor isn't using UTF-8 encoding. If you're using Eclipse, you can configure it to use UTF-8 for *.properties by going to Window > Preferences > General > Content Types .