> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Funções NLS compatíveis

> Consulte as funções de National Language Support (NLS) disponíveis em WINAPI_PARTITION_GAMES no GDK, com ressalvas e notas de uso do XBOX Game OS.

As funções de National Language Support (NLS) ajudam os títulos a oferecer suporte a comportamentos específicos de idioma e localidade. Somente as funções de API definidas na partição `WINAPI_PARTITION_GAMES` em `WinNLS.h` estão disponíveis no XBOX.

<Note>
  As APIs marcadas como **PRETERIDA** ainda funcionam no GDK, com as ressalvas documentadas no Microsoft Docs. Prefira as substituições.
</Note>

## Funções disponíveis

| Função | Estado | Substituição |
| - | - | - |
| `EnumSystemLocalesEx` | | |
| `FindNLSStringEx` | | |
| `FoldStringA` | | |
| `GetACP` | | |
| `GetCurrencyFormatEx` | | |
| `GetGeoInfoEx` | | |
| `GetLocaleInfoEx` | | |
| `GetNumberFormatEx` | | |
| `GetStringTypeA` | | |
| `GetStringTypeExA` | | |
| `GetThreadLocale` | | |
| `GetUserDefaultGeoName` | | |
| `GetUserDefaultLocaleName` | | |
| `GetUserPreferredUILanguages` | SEM SUPORTE | Sempre retorna `en-US` |
| `IdnToAscii` | | |
| `IdnToUnicode` | | |
| `IsValidCodePage` | | |
| `IsValidLocaleName` | | |
| `LCIDToLocaleName` | | |
| `LCMapStringEx` | | |
| `LocaleNameToLCID` | | |
| `ResolveLocaleName` | | |
| `SetThreadLocale` | | |
| `CompareString` | PRETERIDA | `CompareStringEx` |
| `CompareStringA` | PRETERIDA | `CompareStringEx` |
| `EnumSystemLocalesA` | PRETERIDA | `EnumSystemLocalesEx` |
| `EnumSystemLocalesW` | PRETERIDA | `EnumSystemLocalesEx` |
| `FindNLSString` | PRETERIDA | `FindNLSStringEx` |
| `GetCPInfo` | PRETERIDA | Use Unicode |
| `GetCPInfoExA` | PRETERIDA | Use Unicode |
| `GetCPInfoExW` | PRETERIDA | Use Unicode |
| `GetCurrencyFormatA` | PRETERIDA | `GetCurrencyFormatEx` |
| `GetCurrencyFormatW` | PRETERIDA | `GetCurrencyFormatEx` |
| `GetGeoInfoA` | PRETERIDA | `GetGeoInfoEx` |
| `GetGeoInfoW` | PRETERIDA | `GetGeoInfoEx` |
| `GetLocaleInfoA` | PRETERIDA | `GetLocaleInfoEx` |
| `GetLocaleInfoW` | PRETERIDA | `GetLocaleInfoEx` |
| `GetNumberFormatA` | PRETERIDA | `GetNumberFormatEx` |
| `GetNumberFormatW` | PRETERIDA | `GetNumberFormatEx` |
| `GetUserGeoID` | PRETERIDA | `GetUserDefaultLocaleName` |
| `LCMapStringA` | PRETERIDA | `LCMapStringEx` |
| `LCMapStringW` | PRETERIDA | `LCMapStringEx` |

## Notas sobre o comportamento do Game OS

As funções NLS do Game OS **não** incluem as tabelas linguísticas completas de maiúsculas e minúsculas que o Windows tem. As operações de agrupamento e de conversão de maiúsculas/minúsculas sempre usam valores **ordinais**, independentemente da localidade.

**Faça a conversão de maiúsculas/minúsculas e a ordenação sensíveis à cultura como parte do seu processo de localização**, e não em tempo de execução.

Funções afetadas:

| NLS |
| - |
| `LCMapStringEx` |
| `CompareStringEx` |
| `CompareString` |
| `CompareStringA` |

### Agrupamento

| Base | Wide | Multibyte |
| - | - | - |
| `std::collate` | | |
| `strcoll` | `wcscoll` | `_mbscoll` |
| `_stricoll` | `_wcsicoll` | `_mbsicoll` |
| `_strncoll` | `_wcsncoll` | `_mbsncoll` |
| `_strnicoll` | `_wcsnicoll` | `_mbsnicoll` |

### Conversão para maiúsculas

| Base | Variante | Variante wide |
| - | - | - |
| `std::toupper` | `toupper` | `towupper` |
| `_toupper` | `_toupper_l` | `_towupper_l` |
| `std::isupper` | `isupper` | `iswupper` |
| `_isupper_l` | `_iswupper_l` | |

### Conversão para minúsculas

| Base | Variante | Variante wide | |
| - | - | - | - |
| `std::tolower` | `tolower` | `towlower` | |
|  | `_tolower` | `_tolower_l` | `_towlower_l` |
| `std::islower` | `islower` | `iswlower` | |
| `_islower_l` | `_iswlower_l` | | |

<Note>
  Esta lista não é completa — outras funções da Biblioteca Padrão do C++ podem depender das APIs afetadas.
</Note>

## Documentação de API relacionada

* [Referência de recursos do XGameRuntime](/pt-BR/reference/system/xgameruntimefeature/xgameruntimefeature_members) — superfície de localidade + região do GDK que complementa as NLS


## Related topics

- [Visão geral de localização e globalização](/pt-BR/build/game-principles/localization.md)
- [Listar funções](/pt-BR/services/playfab/api-references/rest/cloudscript/server-side-cloud-script/list-functions.md)
- [Idiomas compatíveis](/pt-BR/publishing/game-publishing/concepts/metadata-supported-languages.md)
- [Funções no multiplayer](/pt-BR/services/xbox-services/multiplayer/concepts/live-multiplayer-roles.md)
- [Funções do Xwmaencoder](/pt-BR/build/console-features/audio/tools/xwmaencoder/tech-xwmaencoder-nativereference-funcs.md)
