Django 多语言支持
如果文本以法语或印地语存储,则使用 django。如何在文本框字段
Models.py
class Details(models.Model):
title = models.CharField(max_length = 255)
html 页面中存储和检索该文本:
<form action="/pjt/details">
<input type="text" name="nee_n"id="neen_n" />
</form>
如何将其存储在数据库中并检索回相同的内容。是否有任何设置需要更改在settings.py中
谢谢..
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" name="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..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Django 基于 Unicode,因此语言字符将被正确存储。
存储语言,即用户的文化是一个不同的问题。这最初可以从格式为“en_US”或“fr_FR”的 HTTP 请求中收集。
该标准是 ISO 639-1 和 ISO 3166-1 的串联。
然而,浏览器文化并不总是可靠的,因此界面应该为用户提供改变其文化的机会。
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.