internationalization

Good Solutions for Managing Multiple Languages in a project

心不动则不痛 提交于 2019-12-07 14:20:58
问题 We have a need to manage a large number (approx 20+) languages for our application. For previous projects that required fewer languages (3 - 4) we used a simple excel spreadsheet that we sent to various translators and they filled in the translations for the strings. With this many languages and the need to involve multiple translators is there a better solution for managing this data? 回答1: Yes. If you're getting to that scope of internationalization, I would suggest tracking your strings and

How to obtain the languageid in a Liferay theme with velocity

試著忘記壹切 提交于 2019-12-07 14:11:53
问题 For the current theme im creating there are multiple images that require to change based on the current language. For example if the user is visiting the page in english we would load image_ languageid .jpg How can you replace languageid with the actual id of the language in velocity & liferay? Is this a good technique or is there a nicer one? 回答1: Try adding this line in init_custom.vm or portal_normal.vm #set ($language_id = $themeDisplay.getLanguageId()) 来源: https://stackoverflow.com

i18n translation with CakePHP 3

被刻印的时光 ゝ 提交于 2019-12-07 13:59:53
问题 Context I want to translate my app in french and english. I followed exactly the CakePHP 3 documentation but it is not working. What I did so far For my development, I'm using a vagrant box to easily get up and running with CakePHP 3. This box is named vagrant-chef /config/bootstrap.php I modified the line 100 to use french as the default language. ini_set('intl.default_locale', 'fr_CA'); /src/Controller/PagesController I added this method to the default PagesController public function

how can I configure YII i18n feature to use gettext?

若如初见. 提交于 2019-12-07 13:45:01
问题 I installed the yii-web-start extension, it uses a database for message translation, but I need use gettext instead. Where and how can I configure YII-i18n? 回答1: You can set up i18n in your config (protected/config/main.php) with CGettextMessageSource to use gettext. 'components' => array( 'messages' => array( 'class' => 'CGettextMessageSource' ) ), By default, you should store your .po-files under protected/messages. 来源: https://stackoverflow.com/questions/6735670/how-can-i-configure-yii

Xamarin Forms: Cannot add RESX for globalization

南楼画角 提交于 2019-12-07 13:25:44
问题 Trying to use the globalization feature on Xamarin by following the guide, however can't find the Misc category nor the Resource File option in the dialog. My Visual Studio is version 15.1 community version. Steps I took: Right click on the common project Choose Add -> New Item On the dialog, left panel is showing Visual C# with 4 sub-categories: Code, Data, General and Cross Platform. Misc is not one of them. Tried type Resource in the search bar, no result Anyone has this issue? 回答1: I was

Word conjugation with Django i18n and gettext

柔情痞子 提交于 2019-12-07 13:08:53
问题 Currently, I have the following code in a template file in my Django project: {% blocktrans with type=content.get_type %}Edit this {{ type }}{% endblocktrans %} The {{ type }} is a string that can have values such as "lecture" and "exercise" . Here is the output in the .po file: msgid "Edit this %(type)s" msgstr "" This works fine for languages such as English that don't conjugate objects. For languages that do, such as Finnish, this will cause problems. In Finnish, the noun "lecture"

Django i18n Javascript Problem

限于喜欢 提交于 2019-12-07 12:41:20
问题 I have this problem: When i set a language (it or en)in my django app, with this form, the javascript strings are converted always in English. My base Language is Italian. This is my configuration: urls.py: js_info_dict = { 'domain': 'djangojs', 'packages': ('myproject',), } urlpatterns += patterns('', (r'^jsi18n/$', 'django.views.i18n.javascript_catalog', js_info_dict), ) I have run this command: django-admin.py makemessages -d djangojs -l en To generating the djangojs.mo/po files. I Have

Issue using willdurand/BazingaJsTranslationBundle

杀马特。学长 韩版系。学妹 提交于 2019-12-07 12:21:31
问题 In order to use translations in my JavaScript files I implemented the willdurand/BazingaJsTranslationBundle. I exactly followed the repository documentation: I installed the bundle composer require "willdurand/js-translation-bundle:@stable" I registred the new bundle // ... new Bazinga\Bundle\JsTranslationBundle\BazingaJsTranslationBundle(), I set up the routes # app/config/routing.yml _bazinga_jstranslation: resource: "@BazingaJsTranslationBundle/Resources/config/routing/routing.yml" I added

Using new format string specifier configuration dictionary (plurals support) in iOS 7

守給你的承諾、 提交于 2019-12-07 11:58:33
问题 I'm trying to use the new support for more sophisticated localization of plurals in iOS 7. I've created a .stringsdict file, formatted according to the information in the Foundation release notes (and What's New In Cocoa WWDC session). I've verified that the .stringsdict is being copied into my app's bundle (and indeed -[NSBundle pathForResource:...] finds it). However, +[NSString localizedStringWithFormat:] doesn't return a string formatted according to the rules in the configuration

How to organize Java properties entries for internationalization?

送分小仙女□ 提交于 2019-12-07 11:35:19
问题 In our app we have a messages.properties file which contains all of the strings that will be shown to the UI. We have a small app with a few screens and it's already getting unwieldy with duplicate string values throughout. Right now we have it organized with page specific strings separated out with whitespace and comments, with a section for each jsp with the property name having a prefix of the page name. We also have sections for entities, for instance, anywhere we show the user's email