[PHP] Re: problem with xgettext and php with javascript file
this code seem incomplete: window.opener.document.celkem.cena_celkem.value = ? echo _(nìjaký blábol); ? } here's a fix: function zmen_cenu() { window.opener.document.celkem.cena_celkem.value = ? echo _(nìjaký blábol); ?; } Pavel NováK [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello all! I want to use gettext for multilanguage webs, so I'm pleasing you to help me. When I use this: xgettext --keyword=_ file.php on this file: --- script language=JavaScript !-- function zmen_cenu() { window.opener.document.celkem.cena_celkem.value = ? echo _(nìjaký blábol); ? } // -- /script --- I get this message: file.php: 4: warning: unterminated string literal but when I use the same on this file: --- ?$str = _(nìjaký blábol);? script language=JavaScript !-- function zmen_cenu() { window.opener.document.celkem.cena_celkem.value = ?= $str?; } // -- /script --- gettext makes this good. Do you know where is a problem? My gettext version is 0.10.35 Thanks, Pavel Novák -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: problem with xgettext and php with javascript file
now it is the same problem without javascript: FIRST file includes only this row: input type=submit name=submit_dotaz value=?=_(Odeslat dotaz)? class=tlacitko SECOND file includes this: ?$str=_(Odeslat dotaz)? input type=submit name=submit_dotaz value=?=_$str? class=tlacitko When I use: xgettext --keyword=_ file.php on FIRST file I don't get any error message, but it doesn't create the file 'messages.po' but on SECOND file it creates the file 'messages.po' correctly... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: problem with xgettext and php with javascript file
so I know where is the problem: input type=submit name=bla value=?=_(Odeslat dotaz)? gettext is seeking through all of strings in the file, it thinks that one string is: ?=_( and second: )? And it doesn't work even with this: value=?=_('Odeslat dotaz')? or this: value='?=_(Odeslat dotaz)?' Does anybody know how I can do it to be good? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: problem with xgettext and php with javascript file
Note that you don't need to use xgettext to use gettext. It is simply a time-saver that generates a template .po file for you. You can easily create this text file yourself. -Rasmus On Fri, 16 Nov 2001, Pavel Novak wrote: so I know where is the problem: input type=submit name=bla value=?=_(Odeslat dotaz)? gettext is seeking through all of strings in the file, it thinks that one string is: ?=_( and second: )? And it doesn't work even with this: value=?=_('Odeslat dotaz')? or this: value='?=_(Odeslat dotaz)?' Does anybody know how I can do it to be good? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]