django - check values in for loop python -
i have multi language site product have images has content in 2 languages english , spanish.
i need differentiate them particular site, getting images in 1 loop
{% image in images %} {% endfor %}
in image names
image.jpg image_en.jpg image_sp.jpg
for english site need "image.jpg" , "image_en.jpg" , spanish need "image.jpg" , "image_sp.jpg"
how can differentiate them?
you can catch lengauge on server site. create set of name (in case of english , spanish) simple print images in templates. looks easy maybe it's not best.
Comments
Post a Comment