---
name: "SDL_Locale"
section: "3type"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_Locale"
---

# SDL\_Locale(3type)

A struct to provide locale data.

## NAME

SDL\_Locale - A struct to provide locale data.

## HEADER FILE

Defined in SDL3/SDL\_locale.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**typedef struct SDL\_Locale** **{**     **const char \*language;  /\*\*\< A language name, like** *en"***for***English.***\*/**     **const char \*country;  /\*\*\< A country, like** *US"***for***America.***Can***be***NULL.***\*/* **} SDL\_Locale;**

## DESCRIPTION

Locale data is split into a spoken language, like English, and an optional country, like Canada. The language will be in ISO-639 format (so English would be "en"), and the country, if not NULL, will be an ISO-3166 country code (so Canada would be "CA").

## AVAILABILITY

This function is available since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_GetPreferredLocales**(3)](/SDL_GetPreferredLocales/3.md)
