internationalization

How can I copy/pate multibyte characters on Android Emulator?

荒凉一梦 提交于 2019-12-14 04:10:20
问题 I got to know how to copy/paste from command line tool at Paste text on Android Emulator adb shell input keyboard text 'foo' It works very well for ascii characters but it doesn't for multibyte characters. adb shell input keyboard text 'あ' Doesn't pass any character to emulator. adb shell input keyboard text '\u3042' Shows '\u3042' as it is. Is there any way to pass multibyte characters to the emulator from command line correctly? 回答1: I think there is no way to do what you want. Digging in

Translating custom error messages

时光毁灭记忆、已成空白 提交于 2019-12-14 04:00:33
问题 I have a form (using simple_form) which I want to implement support for translated error messages. All my translations appear with the exception of the error message. My Customer model is: class Customer < ActiveRecord::Base attr_accessible :name, :phone, :email, :contact_method validates_presence_of :phone, :email, :contact_method, :message => I18n.t(:required) end My fr.yml file fr: name: 'Nom' phone: 'Téléphone' email: 'Courriel' contact_method: 'Méthode de contact' required: 'Requis' My

I18n and Passwords that aren't US-ASCII, Latin1, or Win1252

最后都变了- 提交于 2019-12-14 03:49:23
问题 How do you handle passwords for services when the user enters something that is best represented in Unicode or some other non-Latin character encoding? Specifically, can you use a Cyrillic password as a password to Oracle? What do you do to verify a user's password against a Windows authentication mechanism if the password is provided as UTF-8? I have some ideas on how this should be handled in our code, but I'm looking for advice from others to make sure our direction is sound. 回答1: The

How to use Spring's i18n mechanism?

霸气de小男生 提交于 2019-12-14 03:17:00
问题 I added localization to my Spring project and it appears to be working but I wonder how I change the language, if the language choice is done based on the browser setting, the HTTP header, a cookie or something else. Is there a way to be explicit as well e.g. taking the locale as a parameter in a way like e.g. hl=de on the HTTP query string? I also want to allow the user to set the language on a settings page, how can I do that? My implementation looks like this and writes messages in English

Internationalization not working properly - No action seems to be happening

99封情书 提交于 2019-12-14 03:15:19
问题 I configured my setting.py as show below: LANGUAGE_CODE = 'pt-br' USE_I18N = True LANGUAGES = ( ('pt_br', ('Portugues Brasileiro')), ('en_us', ('English')) ) MIDDLEWARE_CLASSES = ( ... 'django.middleware.locale.LocaleMiddleware', ... ) LOCALE_PATHS = ('/home/lucas/Documents/ProjectPython/test_internacionalizacao/test_internacionalizacao/locale/') Created an app called core that has in its folder another folder structure as: core ---- templates -------- core ------------ core.html ------------

Not able to access i18 plugin from mutation in classic mode store in Nuxt application

一世执手 提交于 2019-12-14 03:11:07
问题 I'm trying to implement Vuex i18n package within my Nuxt application. In my nuxt.conf.js file in plugins array I have: { src: '@/plugins/i18n.js', ssr: false }, plugins/i18n.js file is: import Vue from "vue"; import vuexI18n from "vuex-i18n/dist/vuex-i18n.umd.js"; import toEnglish from "../translations/toEnglish"; import toSpanish from "./../translations/toSpanish"; import toGerman from "./../translations/toGerman"; export default ({ store }) => { Vue.use( vuexI18n.plugin, store, {

Django i18n_patterns: resolve() doesnt work as expected

倖福魔咒の 提交于 2019-12-13 20:12:30
问题 After solving this problem here, there's another one: if you use the translation url system here https://docs.djangoproject.com/en/1.8/topics/i18n/translation/ you will see you add patterns like urlpatterns += i18n_patterns(...) . The problem is that the base url without the language is not taken in account ie: resolve('/fr/produits/') works, but resolve('/produits/') doesnt work and raises 404. How to solve this? Here are my urls: urlpatterns = [ url(r'^debug/?$', p_views.debug, name='debug'

Django CMS and Rosetta: Can't get template messages translated

萝らか妹 提交于 2019-12-13 16:52:32
问题 Is there any know issue about using Django CMS and Django Rosetta together. I cant get the "static" template messages translated although it appears correctly translated in the Rosetta interface. All the dynamic content is correctly translated. Only the one I´ve set up around the `{% trans 'blabla' %} does not work. 回答1: Gotcha! Just add in settings.py LOCALE_PATHS = (BASE_DIR + "/locale/",) It worked for me. 来源: https://stackoverflow.com/questions/24439031/django-cms-and-rosetta-cant-get

i18n yellow screen of death

烂漫一生 提交于 2019-12-13 16:16:17
问题 System.InvalidOperationException:Värdet null kan inte tilldelas en medlem av typen System.Boolean eftersom den är en värdetyp som inte kan ha värdet null. Thank you Microsoft, intentions are good, I know. As if anybody who really finds this information useful would also consider Swedish as the coding lingua franca. The Moldavians can just turn to Moldavian StackOverflow and post their queries for speedy help. Does anybody know how to get these messages in English? 回答1: The exception messages

Angular i18n translation for Dynamic component

半城伤御伤魂 提交于 2019-12-13 16:07:29
问题 I have been reading up a lot on Angular 2+ i18n and have been looking for the best way to try and build dynamic components. Problem: i18n cannot translate a variables text into an xlf file for dynamic i18n makes it hard to make dynamic components with text using i18n attribute Possible Solution: Even though we cannot use dynamic strings in variables for i18n to pick up when generating the language resource file we should still be able to create components and pass text to them. For the