What is the point of NOT translating "month" to English? 
There are several solutions:

1) Create custom templates / custom tags and include them based on 
language. For example you may have "foo.nl.html" and "foo.en.html" and 
include "foo.<your_lang>.html". But I believe using different HTMLs for 
different language is bad practice.
2) Use different styles for different languages. In your nl.css you may set 
"display:none" to "month" span. Different skins (skin is css + images) for 
different languages are ok, it is much better then different HTML.


On Wednesday, March 4, 2015 at 5:53:38 PM UTC+3, Jaap van Wingerde wrote:
>
> Op 2015-03-03T17:41:21 UTC schreef Jaap van Wingerde 
> <mailin...@vanwingerde.nl <javascript:>> in the message <how to deal with 
> not 
> translated strings in html>, 
> mid:201503031...@jaap.custard.shrl.nl <javascript:> the following text. 
>
> > ../locale/en/LC_MESSAGES/django.po: 
> > 
> > ... 
> > #: template.html:4 
> > msgid "jaar" 
> > msgstr "year" 
> > 
> > #: templates.html:4 
> > msgid "maand" 
> > msgstr "" 
> > ... 
> > 
> > ../templates/template.html: 
> > 
> > {% load i18n %}<!DOCTYPE html><html 
> > lang="{{ LANGUAGE_CODE }}"> 
> > ... 
> > {% trans "jaar" %}<br />{% trans "maand" %} 
> > ... 
> > 
> > resulting html: 
> > 
> > <!DOCTYPE html><html 
> > lang="en"> 
> > ... 
> > year<br />maand 
> > ... 
> > 
> > better html: 
> > 
> > <!DOCTYPE html><html 
> > lang="en"> 
> > ... 
> > year<br /><span lang="nl">maand</span> 
> > ... 
> > 
> > How can i get the better html? 
>
> A solution with handwork: 
>   
> #: templates.html:4 
> msgid "maand" 
> msgstr "<span lang="nl">maand</span>" 
>
> Can this be done automagical? 
>
>
>
> -- 
>
> Jaap van Wingerde 
> e-mail: 12345...@vanwingerde.nl <javascript:> 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/90c090e2-c302-4a4e-b3de-f36577a72e01%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to