Sunday, May 28, 2017

Re: append language-code tot variable name

On Tuesday 23 May 2017 07:08:55 Jaap van Wingerde wrote:

> In my templates I have variables as {{ artobject.title|safe|capfirst

> }}. I want the site in more languages.So in changed the model: title

> changed in title_nl, and I appended title_de, title_en, title_fr.

 

You're trying to solve what Django Modeltranslation already did. Allthough, it can be hard working with it in the beginning stage of a project as models change structure a lot, it should be a breeze when data model is stable.

 

--

Melvyn Sopacua

No comments:

Post a Comment