If there is a long string in PHP like this:
<?php
$text = "Some ... very
very...
long string";
Can it be localized by GetText wrapping it in __()
, e.g.
<?php
$text = __("Some ... very
very...
long string", "domain");
? I’ve heard that GetText doesn’t support multi-line strings and indeed, when I try to scan such file in poEdit, it doesn’t find it.
How do you deal with that? WordPress source files seem to use very long lines so is that the way to go? (Obviously apart splitting the strings into multiple smaller strings which I’d rather avoid.)
Edit: the problem was that I had a variable reference in my string, e.g. __("string $someVar")
which can’t be supported by GetText. My fault.