internationalization

CakePHP 3.0.8 translate behavior and data validation (requirePresence, notEmpty)

梦想的初衷 提交于 2019-12-30 11:32:34
问题 My problem is simple, yet I can't figure out how to solve it. My website is multilanguage. I want the user to be able to add an article in multiple language if he wants, while requiring the inputs of his language (depending on his locale). Problem is, with CakePHP's conventions about translation, all the inputs must end with the field's name, no matter what language. So all the fields has the same rule for the same field. I can't make one "name" required while another in another language not

i18n for static html content

孤街醉人 提交于 2019-12-30 10:44:06
问题 I am building a website on the front of a REST API (this supports i18n) and i'm not sure which way to go about internationalization. I have looked into js and html solutions but they all seem inferior to server side options. Given that most of the pages contain static content that just needs locale support would jsp's be a good solution? jsf seems like overkill. 回答1: I really can not recommend having various HTML files. Localizability best-practices recommend separating the translations from

i18n for static html content

↘锁芯ラ 提交于 2019-12-30 10:44:04
问题 I am building a website on the front of a REST API (this supports i18n) and i'm not sure which way to go about internationalization. I have looked into js and html solutions but they all seem inferior to server side options. Given that most of the pages contain static content that just needs locale support would jsp's be a good solution? jsf seems like overkill. 回答1: I really can not recommend having various HTML files. Localizability best-practices recommend separating the translations from

Rails 3 I18n label translation for nested_attributes in has_many relationship

…衆ロ難τιáo~ 提交于 2019-12-30 09:53:27
问题 Using: Rails 3.0.3, Ruby 1.9.2 Here's the relationship: class Person < ActiveRecord::Base has_many :contact_methods accepts_nested_attributes_for :contact_methods end class ContactMethod < ActiveRecord::Base attr_accessible :info belongs_to :person end Now when I try to customize the contact_method labels in I18n, it doesn't recognize it. en: helpers: label: person[contact_methods_attributes]: info: 'Custom label here' I have also tried: person[contact_method_attributes] This works just fine

Google Apps Script internationalization (i18n)

南楼画角 提交于 2019-12-30 08:57:07
问题 The docs don't seem to mention anything - is there a recommended way on how to do i18n within Google Apps Scripts? Especially ones published as a WebApp? Is there even a way to find out the user's locale? 回答1: Session.getActiveUserLocale() should return the locale. https://developers.google.com/apps-script/reference/base/session#getActiveUserLocale() 回答2: I would strongly suggest to implement this with a HTML service on client side using this very handy jQuery plug-in: http://code.google.com

Terminology used for language and culture-aware software

强颜欢笑 提交于 2019-12-30 08:23:23
问题 I have always thought that the terms "internationalization" and "localization" (and their funny abbreviations i18n and l10n) were universally accepted and used for talking about software which is aware of language and cultural differences. But I recently read a question on SO about these subjects which referred to something called "globalization" and was also tagged as such. Because I haven't heard this term before I wanted to know if is actually used by others and how it compares to the

Language name from ISO 639-1 code in Javascript

瘦欲@ 提交于 2019-12-30 08:14:18
问题 I'm building a website where people can associate a language information to content. The website uses Javascript heavily and the language information associated to various elements is treated internally as an ISO 639-1 code. How to show a list of language names - in the language of the user ? 回答1: If you want a name of an arbitrary language in an arbitrary language (e.g, how to say "Korean language" in Japanese), you can use Unicode CLDR data. To use it in JavaScript, you may use cldr NPM

Language name from ISO 639-1 code in Javascript

邮差的信 提交于 2019-12-30 08:14:02
问题 I'm building a website where people can associate a language information to content. The website uses Javascript heavily and the language information associated to various elements is treated internally as an ISO 639-1 code. How to show a list of language names - in the language of the user ? 回答1: If you want a name of an arbitrary language in an arbitrary language (e.g, how to say "Korean language" in Japanese), you can use Unicode CLDR data. To use it in JavaScript, you may use cldr NPM

Spring MVC LocaleChangeInterceptor annotation based doesn't work

痴心易碎 提交于 2019-12-30 06:17:31
问题 import java.util.Locale; import org.springframework.context.MessageSource; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.support.ReloadableResourceBundleMessageSource; import org.springframework.web.servlet.HandlerMapping; import org.springframework.web.servlet.LocaleResolver; import org.springframework.web.servlet.i18n.CookieLocaleResolver; import org.springframework.web.servlet.i18n

In Java how do I find out what languages I have available my Resource Bundle

て烟熏妆下的殇ゞ 提交于 2019-12-30 03:44:05
问题 I have some resource bundles packaged in my main jar widget_en.properties widget_de.properties I retrieve a resource bundle based on my default locale as folows ResourceBundle.getBundle("widget", Locale.getDefault()); But I want to present the user with a list of available languages supported so that can select a language that may be different to their computers default But I can't find a method in ResourceBundle that would list available locales, I don't want to hardcode a list as I may