简体   繁体   中英

django flatpages and i18n

I'm trying to choose an approach I'd like to use with some part of the upcoming web-site. The part is static content , which I would usually manage with django flatpages framework, that is built in and work great. But the thing is: web site is going to be i18n in many ways and static content is one of them.

For some static content I'm going to use standard django i18n package and .po files. Is there a way to make flatpages work in i18n way? If no, is there a way to implement that desired approach with some django-model-i18n-tool , like django-modeltranslation ?

If all answers is no , what is the best practice to work around i18n static content that should be editable from some part of site, preferably admin part?

Well, there is the package django-flatpages-i18n that even includes a multilanguage menu system. It's pretty small and light-weight but will pull some dependencies like django-mptt .

Alternatively, you could use one of the Django CMS variants like django-cms or feincms . Both of them are pretty feature-complete and thus quite heavy-weight, and both will pull a number of dependencies.

And finally, you could just use a convention that all English pages start their URL with en , and then only link to those. This is the most light-weight but also the feature-poorest solution.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM