translation

Smart way to add language to all website URLS?

こ雲淡風輕ζ 提交于 2019-12-14 03:17:52
问题 In this year i wrote a very big website, with no CMS. I wrote it from scratch. Today i'm starting to implement a translation system. The idea is, basically, to add /language/ inside the URL. This means if the index page, when i'm browsing on default language, has the url http://www.racebooking.net/index.php once the user clicks on the english flag in order to view the english version of the website, the URL will become http://www.racebooking.net/en/index.php in .htaccess, then, i have a rule

Execute batch of microsoft translation queries

纵饮孤独 提交于 2019-12-14 03:09:12
问题 We are trying to use Microsoft translation service provided on Azure market place. I started with the sample code provided at http://code.msdn.microsoft.com/windowsazure/Walkthrough-Translator-in-7e0be0f7/view/SourceCode Using their sample code I can get a single translation. However I would like to get multiple translations in a single request. I tried using DataServiceContext.ExecuteBatch but it throws WebException with "The remote server returned an error: (404) Not Found."

How can I convert a Zend localization/translation array to gettext?

為{幸葍}努か 提交于 2019-12-14 02:46:03
问题 My multi-lingual site already successfully uses the "array" method of Zend translations. I want to convert from that method to the "gettext" method because I've read that gettext is superior. I've tried using http://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/php2po.html but can't get it to work. I think it's not meant to handle Zend arrays as the input. My Zend file (which works) looks like this: <?php return array( 'choose your favorite stores' => 'Choose your %1

Using kazupon/vue-i18n inside a state of Vuex

家住魔仙堡 提交于 2019-12-14 02:34:40
问题 Using https://github.com/kazupon/vue-i18n for localization Vue.t() || $t() || trans() receive a string which is a key to be translated by vue-i18n Hey guys! I'am trying the following code: import Vue from 'vue' export default { task: { status: [ { id: 'pending', name: Vue.t('pending') }, { id: 'done', name: 'Done' } ] } } That is my state.js which is the state of my VUEX! When I try to use the Vue.t function I have the following error: Uncaught TypeError: _vue2.default.t is not a function My

jq: translate array of objects to object

微笑、不失礼 提交于 2019-12-14 01:51:58
问题 I have a response from curl in a format like this: [ { "list": [ { "value": 1, "id": 12 }, { "value": 15, "id": 13 }, { "value": -4, "id": 14 } ] }, ... ] Given a mapping between ids like this: { "12": "newId1", "13": "newId2", "14": "newId3" } I want to make this: [ { "list": { "newId1": 1, "newId2": 15, "newId3": -4, } }, ... ] Such that I get a mapping from ids to values (and along the way I'd like to remap the ids). I've been working at this for a while and every time I get a deadend.

google-api-python-client doesn't work and makes Spyder to fail when starting

拥有回忆 提交于 2019-12-13 21:21:14
问题 I installed google-api-python-client on my Ubuntu 13.04 with sudo easy_install --upgrade google-api-python-client as it is said here. After that I tried to translate something in python with it. I took the code from here. >>> from apiclient.discovery import build >>> service = build('translate', 'v2', developerKey='MyApiKey') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.7/dist-packages/google_api_python_client-1.1-py2.7.egg/oauth2client

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

Magento - Change translation don't work

☆樱花仙子☆ 提交于 2019-12-13 14:29:50
问题 I wan't to change the string: $message = $this->__('There is already an account with this email address. If you are sure that it is your email address, <a href="%s">click here</a> to get your password and access your account.', $url); located in the core/Mage/Customer/controllers/AccountController.php on line 345 I've changed the translation (with Notepad++) in: /design/frontend/default/my_theme/locale/de_DE/translation.csv but it's not working. Anything else, translated in this file, is

Load Resources for other Language

99封情书 提交于 2019-12-13 13:31:29
问题 I have an application, which works with Resources for translation. This is working great. Now, I have a special requirement. For this, I have to load the resource-dll for another language (for example, the application starts and works with English, then I have to also to load the German-translations) and look into it for a translation. Is there an easy-way to do this? 回答1: You need to load the resourcemanager and If you need the resources for an specific language you will need to ask for them

Translate the Flash Message

落爺英雄遲暮 提交于 2019-12-13 12:26:34
问题 I'm trying to translate the flash message I sent, if a form is succesful. The normal request looks like this: $request->getSession()->getFlashBag()->add( 'notice', 'Your E-Mail has been sent.' ); So I tried to translate the message with the following variable: $request->getSession()->getFlashBag()->add( 'notice', 'contact.message.email_has_been_sent' ); After sending the form the message shows "contact.message.email_has_been_sent". So it didn't found the translation, but the variable is right