Internationalization¶
An i18n item is a dictionary : the messages of API Maker and of your custom APIs on the left, their text in a language on the right. A request names the item in a header and gets its errors and messages translated.
| Page | Utility → Internationalization : a name and a TypeScript file which exports the dictionary. |
| Header | x-am-internationalization: <name of the item> (its id works too). Without it, the messages are the ones of API Maker. |
| Translates | The constant errors of API Maker (validation, authorization, not found…), the errorList of your custom APIs, the errors of third party APIs. |
| Placeholders | A constant error keeps its {field}, {value}… placeholders in the translation. |
1. Create the item¶
- The page lists the constant messages of API Maker to start from, and every message named in the
errorListof a custom API.
2. Throw the message¶
3. Ask for the language¶
{ "success": false, "statusCode": 500, "errors": [ { "code": 500, "message": "यह अनुरोध पूरा नहीं हो सका।" } ], "warnings": [] }
- A message the item does not have is answered as it is.
- i18n items go to Git.