i’m currently trying l10n with gettext and have 2 problems in my
application.
it looks like “rake updatepo” cannot find messages inside strings like
output << “
#{_(‘my localized message’)}
”
is this a bug? do i need a newer version (i’m currently using the
gettext-1.8.0-mswin32 gem)? or is it just me doing s.th. wrong?
and the second problem is that despite what language i want to enforce
via
GetText.locale = “fr_CH”
(right before init_gettext in the application controller)
it always seems to fall back to the HTTP_ACCEPT_LANGUAGE from the
browser
i’m currently trying l10n with gettext and have 2 problems in my
application.
it looks like “rake updatepo” cannot find messages inside strings like
output << “
#{_(‘my localized message’)}
”
is this a bug? do i need a newer version (i’m currently using the
gettext-1.8.0-mswin32 gem)? or is it just me doing s.th. wrong?
Hmm. OK.
I’ll try it. But I don’t know I can fix it.
Try this as work arround.
“
%s
” % _(‘my localized message’)
and the second problem is that despite what language i want to enforce
via
GetText.locale = “fr_CH”
(right before init_gettext in the application controller)
it always seems to fall back to the HTTP_ACCEPT_LANGUAGE from the
browser
This may be a bug of 1.8.0.
Could you try CVS version ?
and the second problem is that despite what language i want to enforce
via
GetText.locale = “fr_CH”
(right before init_gettext in the application controller)
it always seems to fall back to the HTTP_ACCEPT_LANGUAGE from the
browser
This may be a bug of 1.8.0.
Could you try CVS version ?
hi again,
tried now with 1.9.0 and it works! woohoo
but something else…
today i read about the “haml” plugin for view templates (see http://haml.hamptoncatlin.com).
which is really cool but gettext doesnt seem to get along with it at all
rake updatepo
Error: #<RubyLex::SyntaxError: unknown type of %string> in app/views/
test/test.haml:1 #content{:style=>‘padding:20px’}
rake aborted!
do you see any chances to support haml-templates in the near future?
i would really love to start using them, but without gettext support
it’d be a no-go.
best regards,
ralf
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.