Can I change the name of a given locale? For example, could I change name the property of the “English” locale to read “Klingon” and then add Klingon translation strings?
If this is possible I assume I would use a PUT request via the API, or perhaps I can POST a whole new Locale?
EDIT: I got a 405 “Method not supported” error for all three: PUT, PATCH, and POST on the /api/locales/db endpoint
You can retrieve and create locales for the database content with GET and POST requests through the following resource. XML and JSON resource representations are supported.
/api/33/locales/db
@chase.freeman would you like to create a Jira bug issue on jira.dhis2.org and we could follow up on this? It’s either a bug or there’s a change that we need to update the docs. (:
No I don’t think it is a bug but would rather lack of documentation. By tracing the network request I think there are required parameters (country and language) in order to POST a new locale. See below for example:
Great! Thanks! I tested it as well using the API and it’s working when using dbLocales + parameters. I’m glad it’s working, would you like to create a pull request to fix the docs?