Transposh WordPress Translation
Phrases and Block to NOT translate (3 posts)

  1. Georg Ludwig
    Posted 3 years ago #

    I had the problem to NOT translate certain things like the company name or special phrases I've put into double brackets. Though I found a workaround in parser.php I'd be glad to have a portable solution in future releases if possible.

    Here's my workaround:

    In the parser.php I've added the following excclusions:

    ` // Unicode - 2 Chars for the <<
    elseif ($string[$pos] == '«') {
    $this->tag_phrase($string, $start, $pos-1);
    while ($string[$pos] != '»' && $pos < strlen($string))
    $start = $pos;
    elseif ($string[$pos] == 'C' && ($pos+10) < strlen($string) && substr($string, $pos, 11) == 'Companyname') {
    $this->tag_phrase($string, $start, $pos);
    $start = $pos;


  2. Ofer Wald
    Plugin Author

    Posted 3 years ago #


    Do you have any good suggestion on how this will be made portable? :)

    Would be happy to hear, truly.

  3. Georg Ludwig
    Posted 3 years ago #


    in my Opinion this could be a simple solution as follows:

    • In the settings section offer the ability to enter phrases that shall not be translated as a CSV-String.
      Split the string into an array and use it with the sample code above to test on such phrases.
    • You may also offer to enter char-combinations that enclose phrases not to be translated, e.g. "<>,[],«»" - could be used to parse with the code above.
      The only problem is what I had: The « and » are held as unicode-character in my installation - perhaps You have a proper idea for that specific problem ?


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Transposh WordPress Translation
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.