> On 20 Aug 2014, at 19:21, Oscar Curero <[email protected]> wrote:
>
> Hi,
>
> I'm building my first application using pyramid and chameleon and I'm having
> problems with the localized URL schema. It's something like this:
>
> /en/products
> /es/productos
> /ca/productes
>
> The problem starts when I need to make the HTML templates. For example, I
> want to make the following template:
>
> <p><a href="/${request.locale_name}/${products}"><img src="products.jpg"
> alt="" /></a></p>
The problem here is that ${products} assumes that you have a python variable
named “products” at hand and want to insert its value in the template. But
since you have no such variable you get a NameError exception. If you goal is
to make the word “products” translatable you can do this: ${_(“products”)} .
Wichert.
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pylons-discuss.
For more options, visit https://groups.google.com/d/optout.