Using django if a text is stored in French or Hindi.How will this be stored and retrieved in a text box field
Models.py
class Details(models.Model):
title = models.CharField(max_length = 255)
html page:
<form action="/pjt/details">
<input type="text" na开发者_如何转开发me="nee_n"id="neen_n" />
</form>
How to store this in the db and retieve back the same .Is there any setting to be changed in settings.py
Thanks..
Django is based on Unicode and so the language characters will be stored correctly.
Storing the language, i.e. the user's culture is a different issue. This can be initially gleaned from the HTTP request in the format 'en_US' or 'fr_FR'.
This standard is a concatenation of ISO 639-1 and ISO 3166-1.
However the browser culture cannot always be relied upon and so the interface should give the user the opportuinity to change their culture.
精彩评论