internationalization

React Native, how to update view after language change

巧了我就是萌 提交于 2021-01-27 06:12:25
问题 I want to support language change (manually by user). I'm using react-native-i18n for that. I found how to change the displayed language at run time but I didn't find how to update the current view. My Code Environment Environment: Node: 8.9.4 Yarn: 1.3.2 npm: 4.0.5 Expected Behavior When I use I18n.locale ='en'; not in function.. just as it is, the text will be in English and when I use I18n.locale ='he'; the text will be in Hebrew. However I need to change the language at run time. So I

React Native, how to update view after language change

為{幸葍}努か 提交于 2021-01-27 06:11:21
问题 I want to support language change (manually by user). I'm using react-native-i18n for that. I found how to change the displayed language at run time but I didn't find how to update the current view. My Code Environment Environment: Node: 8.9.4 Yarn: 1.3.2 npm: 4.0.5 Expected Behavior When I use I18n.locale ='en'; not in function.. just as it is, the text will be in English and when I use I18n.locale ='he'; the text will be in Hebrew. However I need to change the language at run time. So I

Django: Can't change default language

自古美人都是妖i 提交于 2021-01-27 05:29:58
问题 I have been developing for some time in en-gb language code. Now arriving closer to the release date I was going to switch the default language to en-us , but whatever I do the initial request.LANGUAGE_CODE is set to en-gb even for unregistered users. FYI, I would actually like to keep the time_zone to London and simply change the default language to American English. For now I have changed both just to get it working, but still no joy. #TIME_ZONE = 'Europe/London' TIME_ZONE = 'US/Eastern'

Django: Can't change default language

穿精又带淫゛_ 提交于 2021-01-27 05:27:04
问题 I have been developing for some time in en-gb language code. Now arriving closer to the release date I was going to switch the default language to en-us , but whatever I do the initial request.LANGUAGE_CODE is set to en-gb even for unregistered users. FYI, I would actually like to keep the time_zone to London and simply change the default language to American English. For now I have changed both just to get it working, but still no joy. #TIME_ZONE = 'Europe/London' TIME_ZONE = 'US/Eastern'

i18n server-side vs. client-side

非 Y 不嫁゛ 提交于 2021-01-22 09:35:26
问题 Seeking some advice on two approaches to internationalization & localization. I have a web app using Spring MVC and Dojo, and I would like to support multiple languages. So, I could: Use <spring:message> to generate the appropriate text on the server side using a properties file. Use dojo/i18n to select the appropriate text on the client side using a js file. And of course any combination of the two is also an option. So, what are the pros and cons of each approach? When would you use one vs.

i18n server-side vs. client-side

让人想犯罪 __ 提交于 2021-01-22 09:33:30
问题 Seeking some advice on two approaches to internationalization & localization. I have a web app using Spring MVC and Dojo, and I would like to support multiple languages. So, I could: Use <spring:message> to generate the appropriate text on the server side using a properties file. Use dojo/i18n to select the appropriate text on the client side using a js file. And of course any combination of the two is also an option. So, what are the pros and cons of each approach? When would you use one vs.

Django 1.9 sr_Latn locale doesn't work

给你一囗甜甜゛ 提交于 2020-12-30 02:57:12
问题 In Django 1.6.5 the following worked: in settings.py LANGUAGES = ( ('sr_Latn', 'Srpski'), ('en', 'English'), ) whereas the locale folder with translation was also called sr_Latn . With Django 1.9.2. sr_Latn is not recognized as a language code any more so I have to enter sr-latn, but then the locale folder is not found - regardless if it is called sr-latn, sr-Latn, sr_latn or sr_Latn. LANGUAGES = ( ('sr-latn', 'Srpski'), ('en', 'English'), ) This problem is specific to Serbian-Latin only

What does '_' do in Django code?

a 夏天 提交于 2020-12-29 09:45:10
问题 Why does this Django code use _ in front of 'has favicon' has_favicon = models.BooleanField(_('has favicon')) 回答1: If you look in the import statements, you'll find that they tied _ to a function that turns stuff into unicode and localizes it by writing: from django.utils.translation import ugettext_lazy as _ 回答2: _ in Django is a convention that is used for localizing texts. It is an alias for ugettext_lazy. Read Lazy translation in the docs for more info about it. 回答3: _ is usually a macro

Vue.js project using Vue I18n has got the following error: “TypeError: i18n is undefined”

这一生的挚爱 提交于 2020-12-13 04:11:46
问题 I'm trying to add internationalization on my Vue.js project using Vue I18n. I'm using the documentation (i.e. http://kazupon.github.io/vue-i18n/guide/sfc.html#basic-usage), but I've got the following error message: [Vue warn]: Error in render: "TypeError: i18n is undefined" found in ---> <MainNavBar> at src/components/MainNavBar.vue <VApp> <App> at src/App.vue <Root> vue.runtime.esm.js:619 TypeError: "i18n is undefined" $t vue-i18n.esm.js:167 render MainNavBar.vue:33 VueJS 42 <anonymous> main

Location of currency symbol for a particular currency in java

被刻印的时光 ゝ 提交于 2020-12-10 08:01:07
问题 I know the way to get the Currency Object and other details for a currency in java using locale and NumberFormat class. But I am not able to find anything in the API to know whether currency symbol is display at start or end E.g. 10 in US is $10 where $ is in the start of number) 10 in Zloty (polish currency) is 10 z (z to represent zloty symbol though actual symbol is different). Is there any property in number format or currency class which can help me find whether currency symbol is placed