Jump to content

only first translatable string is detected - like there are no line breaks


torf
 Share

Recommended Posts

I have a strange behaviour that I do not understand fully.
I have a couple of translatable strings in my template file:

$Headline_1 = __("Headline1"); 
$Headline_2 = __("Headline2"); 

So when I click on "Find files to translate" this template is found, but only the first string is presented as translatable. If I change the line to 

$Headline_1 = __("Headline1"); //Test
$Headline_2 = __("Headline2"); //Test

Processwire also detects only the first string, but puts the rest of the code as comment. So obviously the system does not detect the line breaks. The file is in UTF without BOM, and had only CR as linebreaks. But changing them to  CR/LF did not do anything.

Did anyone ever encounter something like this, or can tell me where I overlook something crucial?

 

Language-Translator-•-ProcessWire-•-zyto-systeme-d-at.png

Link to comment
Share on other sites

Ok. I found the problem. Just in case anyone runs into the same thing:

I had an included .php file that was was loaded on the very beginning of my template. That file was coded in ANSI which caused the language string detection to break. Another ANSI coded include at the end of the template did not do any harm btw.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...