translation

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

How to add a new domain for translations in Symfony

别说谁变了你拦得住时间么 提交于 2019-12-10 23:50:03
问题 I'm using symfony and in my bundle I need to create some translations, but I rather do it in a different domain than "messages", like FOS User Bundle does (they use the FOSUserBundle domain). So I created a MyBundle.en.yml file with my translations, but they are not loaded. I've read in the documentation I need to do this: $translator->addLoader('xlf', new XliffFileLoader()); $translator->addResource('xlf', 'messages.fr.xlf', 'fr_FR'); $translator->addResource('xlf', 'admin.fr.xlf', 'fr_FR',

How to specify ordered variables in gettext .po files?

醉酒当歌 提交于 2019-12-10 23:26:25
问题 I have a multi-lingual site that uses Zend_Translate PHP arrays to handle the translations. It works fine, but I'm trying to convert to using gettext since that offers extra features. However, I haven't yet discovered the gettext equivalent of a feature that I liked in PHP array translations: n$ position specifier (example #4 of PHP sprintf). I found a good example of what I want (notice how the order of the variables is different in English and Chinese): #: wp-admin/upload.php:96 #, php

Symfony2: problems rendering the translation-form with A2lixTranslationFormBundle and Gedmo\DoctrineExtensions Translatable

百般思念 提交于 2019-12-10 23:04:06
问题 I'm using gedmo/doctrine-translations and a2lix/translation-form-bundle: 2.*@dev to translate my entities. The translation form always renders a Field and Content but my entity itself doesn't contain a Field or Content field. The form type $builder->add('translations', 'a2lix_translations'); 回答1: The 2.0 version of the TranslationFormBundle isn't compatible with the current gedmo/doctrine-extensions version. See the bundle's upgrade notes . You'll need to use the currently unstable branches

How to extract strings from plist files for translation (localization)?

本秂侑毒 提交于 2019-12-10 21:19:36
问题 I need to prepare list of strings for translation of my iPhone application. I have extracted strings from *.m files using genstring and from the XIB files using ibtool command. But I have also lots of texts to translate in plist files (String field types enclosed in string tag). Is there a nice bash script / command to extract those strings into a flat txt file? I could review and filter it so my translators can work with nice list but not with alien looking XML file. 回答1: I made a custom

PyQt: translate module strings at runtime

社会主义新天地 提交于 2019-12-10 20:44:01
问题 Strings in QObject s are translated at runtime. If the translator is changed, all those strings are refreshed. However, strings declared at module level or even static class attributes, are translated at import time. I can see 3 ways of allowing module strings to be translated, none of which seems totally satisfying to me : Import the module after the translator is installed (see here (paragraph Install translator early )). This may not be handy but is feasible, as long as one doesn't need to

Symfony Basic Translation Example

痴心易碎 提交于 2019-12-10 20:12:03
问题 I am new to Symfony2. Trying to establish translation Service. I am following the steps given in the official documentation. But not successful. Following are steps followed In 'symfony/app/config/config.yml' translation service by defining locale "#translator:{ fallback: %locale% }" In 'symfony/app/config/parameters.yml' defined locale parameter "locale:de" In 'src/MyBundle/translateBundle/Resources/translations/messages.de.xlf' is created <?xml version="1.0"?> <xliff version="1.2" xmlns=

Dynamic messages with gettext (AngularJS)

纵然是瞬间 提交于 2019-12-10 17:28:25
问题 I have a application with a Django backend and an AngularJS front-end. I use the angular-gettext plugin along with Grunt to handle translations. The thing is, I sometimes received dynamic strings from my backend through the API. For instance a MySQL error about a foreign key constraint or duplicate key entry. How can I add this strings to the .pot file or non harcoded string in general ? I've tried to following but of course it cannot work : angular.module('app').factory('HttpInterceptor', ['

How to generate symfony2 translations inside controller?

巧了我就是萌 提交于 2019-12-10 15:57:38
问题 Symfony2 project. I'm using JMSTranslationsBundle. Here is a fragment from function inside controller : if ($user->isAccountConfirmed()) { $this->toolbar->addInfo('user.account.confirmed'); } How to generate translation for 'user.account.confirmed' in .xliff file? I mean, what code I should add to this function to be able to translate it? 回答1: Looking at the available extraction methods, it explains that there is no automatic extraction for your case available. You will need to use trans (or

How to best manage multi-lingual presentations?

落爺英雄遲暮 提交于 2019-12-10 15:56:23
问题 I have a presentation done in Latex+Beamer, currently in french. I also need to make the same presentation, with the same structure, in dutch. I'd like to maintain the presentation in one file, so that if I want to change the structure of it, I only have to do it in one place. What's the best way to put the translations outside of the presentation file? I thought of defining a command for each text element to be present in the slides, and having a different command definition for each