problem about translation-Collection of common programming errors


  • John
    c# c++-cli translation dllimport static-classes
    I have the following and I can’t shift the error surrounding the DllImport#include “stdafx.h” #include <msclr/auto_gcroot.h>using namespace System; using namespace System::Diagnostics; using namespace System::Runtime::InteropServices; using namespace System::Threading; using namespace System::Collections::Generic; using namespace System::Text;namespace WinFlix {class FlickWin{[DllImport(“user32.dll”)]extern “C” bool SetForegroundWindow(IntPtr hWnd);I’ve been tranlating this class from C# w

  • Chris Ballance
    c# api formatting translation
    My application consumes an external Translation API (no option to use other translation engines). I’m seeing the following unexpected behavior when I call the translation engine.input <b1> Hello World. </b1>expected output <b1> Hola a todos. </b1>actual output <b1>Hola a todos.</b1>Is it proper for the API to be trimming the spaces? This feels wrong to me.Note: it is documented to replace non-html tags with <b1></b1> tag pairs (numbers increment

  • codemania
    php translation
    Hey i am making a translator and want to translate a text from language $primary to $ secondary i have used this code$primary = $_POST[‘primary’]; $secondary = $_POST[‘secondary’];try{$gt = new Gtranslate;/*** Lets switch the request type to CURL*/$gt->setRequestType(‘curl’);$translate_string = $utkarsh; $n=$gt->$primary_to_$secondary.($translate_string); $p = urlencode($n);But i am getting a error Parse error: syntax error, unexpected ‘)’ in /home4/hangup/public_html/funchio.com/trans

  • j0k
    php zend-framework translation
    I’m using Zend Translate on a project I’m working on, and from the last week or so, whenever I add a new string to the .po file, the scripts breaks giving the following error:Warning: Unexpected character in input: ” (ASCII=1) state=0 in C:\www\videobserver-web\application\languages\pt_PT\application.mo on line 132But if I change the string that I want to translate to anything else, it starts working.And if I add another string to translate, the file starts to work again.I’m using Poedit to ma

  • Saubhagya
    c# google-analytics translation utilities google-translate
    I’m using Google Translation API to translate text from Chinese Simplified to English in my C# program. The problem is if the text is small (around one line) the API is able to translate it, but if the text is larger (more than 3 lines) is gives an exception saying “The remote server returned an unexpected response: (414) Request-URI Too Large.”. However if I use translate.google.com in my browser that works fine.Please tell me how can I process large documents using Google Translate API in my d

  • vsz
    qt translation
    The Qt tutorial for translatable texts does not mention whether it is possible to use HTML inside of a translatable string. However, some examples I found use it, so it seems to be possible.However, if I so much as use “<B>text</B>” in my .ts file, Qt Linguist does not open it. It displays the error message “unexpected tag” instead.

  • whuber
    python raster translation
    I tried to use QGIS GeoReferencer to translate a raster layer, but somehow failed. It just goes to somewhere unexpected. Now I decide to do it myself, with python. I think some libraries like GDAL must have done it. I only want to do an x-offset and y-offset with the tif, with no scale and rotation. Do you know what module I could use?

  • theatomicdude
    php javascript jquery cookies translation
    I have a function to set cookies, and i have .bind() set on some of my links so that they trigger the cookie function when clicked. Right now, when they are clicked no cookie is set. I’ve spent hours on this and cant figure it out. <script type=”text/javascript”> function createCookie(name,value,days) { if (days) {var date = new Date();date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));var expires = “;expires=” + date.toGMTString(); } else {var expires = “”; } document.cookie = n

  • Sally Walker
    artificial-intelligence translation prolog swi-prolog
    Hello hello 😀 😀 I’m working on this this wonderful Prolog project and I’m stuck at this situation where I need to translate certain words into other words (e.g “i” into “you”. “my into “your”) This is what I’ve done and I’m pretty sure it’s kidna iffy. I enter the sentence and when It goes to convert it only changes the one word then goes on wacky on me. (e.g. “i feel happy” changes to “you” then it crashes.) Any suggestions? translate([]). translate([H|T], [NewH|NewT]):-means(H,NewH);spit(T

  • toblerpwn
    ios xcode localization translation
    Whenever I add a new language to Xcode (Project -> Localizations -> +), Xcode crashes immediately. Here is the error:Process: Xcode [1362] Path: /Applications/Xcode.app/Contents/MacOS/Xcode Identifier: com.apple.dt.Xcode Version: 4.4.1 (1488) Build Info: IDEApplication-1488000000000000~2 App Item ID: 497799835 App External ID: 9950605 Code Type: X86-64 (Native) Parent Process: launchd [132] User ID: 501Date/Time: 2012-09-10 11:53:15.9

  • user21321
    translation entity-translation custom-entity
    A little history. We need to load our drupal site with content, parsing XML files, with about 100.000 records each xml. The XML’s have also translations. Our first approach was to create content types, with translatable fields, use XMLReader to parse the xml, and create nodes programmatically. VERY slow, the server crashed out of memory, since drupal creates a node for each translation, e.t.c. The next approach was to create custom entities, using the schema API. I have searched the internet and

  • Stephen
    translation
    I working with a theme that supports langauge settings. I’ve changed the setting in WP-Config to:define(‘WPLANG’, ‘es_ES’);The theme I’m using did not provide the es_ES.po or es_ES.mo files so I created my own es_ES.po and took the es_ES.mo from es.wordpress.org (after I downloaded the Spanish version).The translation is working but its not picking up the entries I specify in es_ES.po, for example:#. Text in function #: daydream/comments.php:78 msgid “Be nice!” msgstr “Escribe!”This still displa

  • jsgoupil
    symfony2 translation plural
    Symfony has a great pluralization logic with the translation bundle. However, I would like to bring this logic to JavaScript since I am updating a string from an Ajax call.Is there such “library” available to do such a thing?

  • long
    php translation
    Possible Duplicate:How to write code for multilingual in php? Can you please explain me how to use the following php code ? I am not sure if i execute it properly… All file .php are on same directory. When i try to execute decide-lang.php, i got ( ! ) NOTICE: Undefined variable:_Get in c:\wamp\www\lang\decide-lang.php on line 2 Thanks./////////////////////////////// index.php ////////////////////////////// <?php require(“decide-lang.php”); ?> <html><title>Exercice <

  • kiamlaluno
    javascript json translation
    I need to make this jquery run much faster, I did not create all of these functions, but need their methods, to do live translations of page content.So I would appreciate any suggestions to refactor for better performance, the code below./* function 1 read json into array */ /* function 2 loop through array */ /* function 3 replace text nodes based on data from looped array */var en_lang = new Array(); var fr_lang = new Array(); var frca_lang = new Array(); var my_data = null; var en_count = 1;

  • Jeremiah Prummer
    translation plugin-wpml
    I’m helping someone with a custom plugin and they need it to be WPML compatible. Using the method from WPML I was able to register a string in WPML and output it on the other end. However, when the plugin was initially activated I got a Call to undefined function icl_register_string() error. It worked, but threw a fatal error. Any idea why this could be? Source: http://wpml.org/documentation/support/translation-for-texts-by-other-plugins-and-themes/Here’s my code://Register Settings with WPML ic

  • theatomicdude
    multi-language translation
    If you go to http://bit.ly/QdBvJ9 (link obscured so this isnt the first thing to show up when the new site is searched for) and click on japanese in the top left corner, it shows the japanese page with this showing up: <!–[if gt IE 8]><!–> <html class=”no-js” lang=”ja” dir=”ltr”> <!–<![endif]–> but the actual content remains in English, other non-latin languages like ?????? work fine but Japanese doesnt. I have no idea why this is happening. If you need anymore in

  • Brady
    plugin-development javascript tinymce translation localization
    I know that I can get my translations into JavaScript doing:$MyTranslations = array(‘translation1′ => __(“Some String 1”, “MyTranslations”),’translation2’ => __(“Some String 2”, “MyTranslations”));wp_localize_script( ‘jquery’, ‘my_translations’, $MyTranslations );But looking at some of WordPress TinyMCE plugins they use calls like this:{ title : ed.getLang(‘advlink.link_desc’), … }How is WordPress getting their translations into getLang()? Am I supposed to do it this way or do I just use

  • Molot
    views entity-reference i18n translation
    I know I can simply add language to displayed title of a node in Entity Reference field based on views. What I failed to discover is how to limit possible values to only show and allow matching ones.When current node is language independent, all nodes should be listed as possible in reference field. When node has language defined, only nodes of the same language, or undefined language, should be available.I don’t really mind wrong selection to be saved in database if language of node will be cha

  • izx
    configuration compiling translation
    I am trying to build this language modelling toolkit but I run into this problem when trying to get it set up. I am trying to understand what the error means, and what I should do to fix it, I dont understand because I had just installed the auto tools but now I am getting this problem and it seems to be one of them.USER@WH:~/irstlm-5.70.04$ ./regenerate-makefiles.sh Calling Calling /usr/bin/aclocal… Calling /usr/bin/autoconf… configure.in:18: error: possibly undefined macro: AC_DISABLE_S

  • j0k
    php session symfony2 translation
    I have an error when I add translation feature in my Symfony application : here is the error :Fatal error: Call to undefined method MyApp\FilmothequeBundle\Controller\DefaultController::get() in C:\wamp\www\Symfony2\src\MyApp\FilmothequeBundle\Controller\DefaultController.php on line 41the line 41 is :$this->container->get(‘session’)->setLocale($langue);and it is in this controller function :public function choisirLangueAction($langue = null) {if($langue != null){// On enregistre la lan

  • François
    javascript translation tridion
    I recently installed Tridion 2011 SP1 with SDL module Translation Manager enabled. Everything was working fine. Then I installed the Tridion 2011 Powertools, following the installation procedure. When trying to reload the GUI (browser cache emptied and modification parameter instanciated for server element in WebRoot\Configuration\System.Config) I’m getting the following Javascript error : SCRIPT5007: Unable to get value of the property ‘getItemType’: object is null or undefinedDashboard_v6.1

  • Daniel
    symfony1 localization internationalization translation symfony-1.4
    I’ve started localizing my Symfony project but when I tried to use the __() function inside actions.class.php it came up with an error: Call to undefined function __(). The texts I have inside actions class are the form’s labels and errors.How can I localize these labels and errors if I am not allowed to use __() function? Is the simple translation into the catalogue enough? The same question applies for the Form classes.Thank you.

  • Pedro Cimini
    java c++ string operators translation
    I need to translate some code from c++ to java, and I am not so sure how to deal with the ‘const char*’ operators. Check code below:const char* handText; const char* index = strchr(handText, ‘-‘); char handCeil[4]; char handFloor[4]; strncpy(handCeil, handText, index – handText); strcpy(handFloor, index + 1);What I got is something like:String handText; String index = handText.substring(handText.indexOf(‘-‘)); char handCeil[4]; char handFloor[4];However, I don’t know what it means when you add i

  • Martijn
    php translation define redefine
    I’m working on converting an old define()-based language/translation system to a more flexible one (probably JSON-based, but it’s still open).As part of this conversion, I will need to convert from 42 .php files with several thousand strings each to whatever format I’ll be using. Some of the defined strings reference other defines or use PHP code. I don’t need to keep this dynamic behaviour (it’s never really dynamic anyway), but I will need to have the “current” values at time of conversion. On

  • Matheus Henrique
    c++ vb6 translation
    Ok, I have this working single file written in C++ and I need help translating the code into VB6. Any help is appreciated. I have problem understanding how to make a struct like the one in the code, or what uint8_t and and uint32_t etc stand for. It’s so small but I really need it. Thanks in advance.#include <stdio.h> #include <stdint.h> #include <Windows.h>#pragma pack(1) struct textField {//0union nameField{void* ptr;char cstring[16];} text;//16uint8_t textLength;//17char unk

  • Ciryon
    ios localization translation languages linguistics
    Often in our iOS projects we have multiple supported languages. They are stored in standard .string files that look something like:/* News section */ “news_title” = “News”; “ok_button_title” = “Ok”;This file can of course just be mailed to a non-technical translator who’s told “Just replace the stuff to the right with the equivalent text in French”. This is not always easy for them to understand, they might open the file in wordpad.exe and save it in a strange format, or generally mess up the f

  • Bren G.
    cakephp internationalization translation
    I am trying to get the translate behaviour working, i deleted the translated comlumns from the original table and now I am getting errors when performing the following query:$menu = $this->Menu->find(‘first’, array(‘conditions’ => array(‘Menu.title’ => ‘main-nav’)));My Menu model:<?php class Menu extends AppModel {var $name = ‘Menu’;var $actsAs = array(‘Translate’ => array(‘title’, ‘link_title’, ‘path’),’Tree’);/*var $belongsTo = array(‘Content’); disabled for now.. */ } ?>H

Web site is in building

I discovery a place to host code、demo、 blog and websites.
Site access is fast but not money