Elegoo-Obico Language Support
The Elegoo-Obico APIs support internationalization (i18n) through the lang query parameter. This allows API responses to be returned in the user's preferred language.
Language Parameter
Usage
The lang parameter can be added to any Elegoo partner API request to specify the desired response language. The parameter accepts IETF language tags (e.g., zh-CN, pt-BR, en-US).
Format
- Parameter name:
lang - Format: IETF language tags (case-insensitive)
- Examples:
zh-CN,zh-TW,pt-BR,en-US,es,de,fr,it,ru - Where to pass: Query parameter only (
?lang=zh-CN)
The parameter accepts both hyphenated (zh-CN) and underscore-separated (zh_CN) formats. Both will be normalized internally.
How It Works
- The
langquery parameter is read from the request URL - The value is normalized (underscores converted to hyphens, lowercased)
- The IETF tag is mapped to a Django language code
- Django translations are activated for the request
- All user-facing messages in the API response are returned in the specified language
Example Requests
With language parameter
POST /ent/partners/api/elegoo/chats/messages/?lang=zh-CN
POST /ent/partners/api/elegoo/plate_analysis/?lang=pt-BR