I have a resource file in which i keep all my strings used in the application. Some of the strings have \n in them, as I want the strings to be displayed in different lines.
When I use msgfmt to get the .mo file, I get the error saying "invalid control sequence" and the .po doesn't get compiled.
ex:
STRTABLE{
/* FIRST_STRING*/ _("display this is line 1.\n\n\
display this in line2")
}
enum {
FIRST_STRING
}
my code has:
wxStaticTextVar->SetLabel(STRTABLE[FIRST_STRING]);
I am using poedit. I have to convert this to German. I did my own translation for the string. I got the .po file.
But, msgfmt doesn't like the control characters \n\n in the translated string. If I remove those, then everything is fine, but then, the string doesn't show up in 2 lines in the localized German UI as I wanted.
I would appreciate if anyone can suggest how to make this work.
thanks,
shailesh
msgfmt not able to handle CR??
Re: msgfmt not able to handle CR??
Hi,
Chris
Did you try write that in a single line likesdp wrote: STRTABLE{
/* FIRST_STRING*/ _("display this is line 1.\n\n\
display this in line2")
}
?STRTABLE{
/* FIRST_STRING*/ _("display this is line 1.\n\ndisplay this in line2")
}
Chris
this->signature=NULL;
Hi,
if you want to write a string in 2 lines - in my opinion - you have to write it in this way:
Try it
if you want to write a string in 2 lines - in my opinion - you have to write it in this way:
Code: Select all
_("display this is line 1.\n\n"
"display this in line2")