views.i18n.JSONCatalog

class JSONCatalog [source]

In order to use another client-side library to handle translations, you may want to take advantage of the JSONCatalog view. It’s similar to JavaScriptCatalog but returns a JSON response.

See the documentation for JavaScriptCatalog to learn about possible values and use of the domain and packages attributes.

The response format is as follows:

{
    "catalog": {
        # Translations catalog
    },
    "formats": {
        # Language formats for date, time, etc.
    },
    "plural": "..."  # Expression for plural forms, or null.
}
doc_Django
2016-10-09 18:41:15
Comments
Leave a Comment

Please login to continue.