Am 25.09.2014 08:30, schrieb Lemonfiend:

On Thu 25 Sep 08:13, Lemonfiend wrote:

Yes, and it also works only with vibe.web.web.render! So using
res.render!() in particular won't work, as well as
res.renderCompat!(). Those are just the plain template rendering
functions without any translation support.
Ah I see.

I'll change the logic of determineLanguage to fall back to the default
algorithm instead of the default language.
Thanks!

Btw. Is it possible to translate things like this?
input&(type="text", placeholder=myi18nplaceholder)

Currently only by using the undocumented diet_translate__ function:

input(type="text", placeholder=diet_translate__("my_i18n_placeholder"))

I didn't put enough thought into a final solution, but maybe I will just
end up renaming diet_translate__ to simply tr and make it publicly
documented.

Alternatively, a syntax using & would be an option:

input(type="text", placeholder&="my_i18n_placeholder")

Oh, and is it possible to mark a method as NOT being a route?

It should be the case that only public functions are registered, so
either private, package or protected should cause it to be ignored.

On top of that, there should definitely also be an annotation, such as
@ignore, in the future. I'm just not sure so far if it is a good idea
to reuse vibe.data.serialization.ignore or if it's better to define a
new vibe.web.common.noRoute attribute. Probably the latter...