Closed jpmckinney closed 10 years ago
Hmm. How does fast_gettext
work, or rather - how does it work differently than i18n
?
fast_gettext looks like:
_("I'm in your templates, looking like English.")
I18n usually looks like:
t('a.nested.list.of.keys')
fast_gettext usually stores translations in PO files. I18n usually uses big hashes in YAML files. However, they each have a variety of backends, but their non-default backends are less well documented. fast_gettext is faster than I18n.
So with fast_gettext, you put your "default" text directly into the template, and it also acts as a key to access the other translations?
Yeah, gettext is a very mature library, it can handle fuzzy matches, etc.
Cool - yeah, that's much more appealing to me.
Sounds good, I'll use gettext when I get to that.
So, I will need to translate Scout to French, before the end of the year if things go according to schedule. Any opinions on libraries, or can I just use the I18n gem, as in the Sinatra docs? The I18n gem means there will be lots of symbols but little English in templates. If we prefer having English around, we can use a gettext library like fast_gettext.