translation

php-gettext isn't working

試著忘記壹切 提交于 2019-12-24 19:03:30
问题 I'm trying to setup localization using php-gettext, but it doesn't seem to work no matter what. I have an index.php: <?php require_once "localization.php";?> <a href="?locale=en_US">English</a> | <a href="?locale=de_DE">German</a> <br> <?php echo _("Hello World!"); ?><br> <?php echo _("My name is"); ?> Bob. and the localization.php <?php $locale = false; if (isset($_GET["locale"])) { $locale = $_GET["locale"];} putenv("LC_ALL=$locale"); setlocale(LC_ALL, $locale); bindtextdomain("messages", "

Is it possible to auto-translate an Iframe with google translation?

丶灬走出姿态 提交于 2019-12-24 14:25:32
问题 I'd like to translate to french an iframe on my website automatically when users come to that page : http://www.julienlussiez.com/p/boutique.html Is it possible? Here's the code: <iframe height="525px" scrolling="no" src="http://julienlussiez.bandcamp.com/album/fragile" width="950px"></iframe> Thanks 回答1: In general, I'd say just set the src of your iframe to this: http://translate.google.com/translate?hl=fr&sl=auto&tl=fr&u=BLANK Where BLANK is the url of the website. However, it doesn't seem

Zend 2 Doctrine 2 Gedmo Translatable

泄露秘密 提交于 2019-12-24 11:27:42
问题 I am trying to use the Gedmo translatable extension for Doctrine 2 in a Zend Framework 2 application. I have it setup like this: 'doctrine' => array( 'eventmanager' => array( 'orm_default' => array( 'subscribers' => array( 'Gedmo\Translatable\TranslatableListener' ) ) ), 'driver' => array( 'application_entities' => array( 'class' => 'Doctrine\ORM\Mapping\Driver\AnnotationDriver', 'cache' => 'array', 'paths' => array(__DIR__ . '/../src/Application/Entity') ), 'translatable_metadata_driver' =>

Translation file still working after modifying the source?

﹥>﹥吖頭↗ 提交于 2019-12-24 10:57:12
问题 A part of my .ts file, created with pylupdate4, looks like: <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS><TS version="2.0"> <context> <name>Main</name> <message> <location filename="Main.py" line="2369"/> <source>Translate me to Ukululu</source> <translation type="unfinished"></translation> </message> Two questions: 1: The translation comes between the <translation> -tags, right? 2: The translation seems to need the line in the main file where the translation is to be inserted ("line

Computer-assisted translation for GWT recommendations

妖精的绣舞 提交于 2019-12-24 10:38:17
问题 We are looking for a suitable solution to translate our GWT application collaboratively. We have a bunch of constants and messages property files that need to be translated by different people. Till now we've emailed the files and manually merged the translated content back which obviously doesn't scale very well. Is there any tool (preferably an open source project) you can recommend that does play well with the i18n support of GWT and allow for collaboratively translation? 回答1: There is a

What are the endpoints for the new Microsoft speech service WebSocket APIs?

谁说胖子不能爱 提交于 2019-12-24 05:53:07
问题 I want to use the new MS Speech Translation API, but I am working with Go so there is no SDK. I have a WebSockets implementation for the previous Translator Speech API, so raw WebSocket are no issue. The documentation states that it is using WebSockets, but I was unable to find the endpoints in the documentation. Does anyone know what are the WS endpoints and their path/header parameters? EDIT: The documentation also says: "If you already have code that uses Bing Speech or Translator Speech

My Language translation does not work in Google chrome and IE

与世无争的帅哥 提交于 2019-12-24 04:45:59
问题 I developed a web application for the process of Language translation from English to Arabic. it is a model profile page. Its has two links in the bottom of the page if I click the "English" link it will display in English and i have a "Arabic" link which will display in Arabic I am able to insert the Non-English values in to the MySQL DB and can retrieve it back. I downloaded and changed the Locale Switcher plugin in Firefox and also made changes for my computer input language. Its working

Symfony: Why is method $this->get() not available in constructor?

我怕爱的太早我们不能终老 提交于 2019-12-24 04:41:34
问题 my constructor of my Controller looks like: function __construct(){# var_dump($this->get('translator')); exit(); } this will give a FatalErrorException: Error: Call to a member function get() on a non-object . But why? If I use it inside a action it will work. 回答1: This is because Controller method get needs the container property. Controller extends ContainerAware which has a method setContainer . This method let the property container be aware of the Container. Upon instanciation, no method

Cake php default bahaviour for Translate behaviour not working

送分小仙女□ 提交于 2019-12-24 03:31:08
问题 Can anyone suggest me why when there are no translation for a field it is returned empty, and not with the default translation? I will appreciate all suggestions... Can`t tell what part of my code you want to see, because it is all straight forward from www.book.cake.org. So i pasting some code: Model definition: <?php class Article extends AppModel { var $useTable = 'nc_articles'; var $name = 'Article'; var $actsAs = array( 'Translate' => array( 'title', 'content', 'meta_key_words','meta

Repair wrong translation

杀马特。学长 韩版系。学妹 提交于 2019-12-24 03:27:57
问题 There are a lot of places in liferay portal where translation to my language (sk_SK) is wrong. Is it possible to rewrite those bad translations with hook? (Any other idea is welcomed...) Thanks a lot. 回答1: yes you can do it. in your liferay-hook.xml file add entry for language file which you want to override, like in your case Language_sk.properties <hook> <language-properties>content/Language_sk.properties</language-properties> </hook> you can check this file in Liferay source code from