MockHero

locale_code

Location

Generate BCP 47 locale codes like 'en-US', 'de-DE', 'ja-JP'. Used for internationalization fields, language preferences, and content localization.

Example Outputs

en-USde-DEja-JPfr-FRpt-BR

API Usage

Send a POST request to generate locale code data:

curl -X POST https://mockhero.dev/api/v1/generate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "tables": [
    {
      "name": "example",
      "count": 5,
      "fields": [
        {
          "name": "locale_code",
          "type": "locale_code"
        }
      ]
    }
  ]
}'

Common Use Cases

  • i18n testing
  • Language preference fields
  • Content localization testing
  • API locale parameters

Quick Info

Field Type
locale_code
Category
Location
Parameters
None required
Output Format
JSON, CSV, SQL

Try it now

Generate locale code data instantly in the playground.

Generate Locale Code + 155 more types via API

One API call. Multiple tables. Relational integrity. Free tier included.

Get Started Free