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

# サポートされる NLS 関数

> GDK において WINAPI_PARTITION_GAMES で公開される NLS (National Language Support) 関数のリファレンス。Game OS における注意事項と使用上の注意を含みます。

National Language Support (NLS) 関数を使用すると、タイトルで言語およびロケール固有の動作をサポートできます。XBOX では、`WinNLS.h` の `WINAPI_PARTITION_GAMES` パーティションの下に定義されている API 関数のみが利用可能です。

> [!NOTE]
>
> **DEPRECATED** とマークされている API も、Microsoft Docs に記載された注意事項付きで GDK 上では引き続き動作します。可能であれば置き換え先の API を使用してください。

## 利用可能な関数

| 関数 | 状態 | 置き換え先 |
| - | - | - |
| `EnumSystemLocalesEx` | | |
| `FindNLSStringEx` | | |
| `FoldStringA` | | |
| `GetACP` | | |
| `GetCurrencyFormatEx` | | |
| `GetGeoInfoEx` | | |
| `GetLocaleInfoEx` | | |
| `GetNumberFormatEx` | | |
| `GetStringTypeA` | | |
| `GetStringTypeExA` | | |
| `GetThreadLocale` | | |
| `GetUserDefaultGeoName` | | |
| `GetUserDefaultLocaleName` | | |
| `GetUserPreferredUILanguages` | NOT SUPPORTED | 常に `en-US` を返します |
| `IdnToAscii` | | |
| `IdnToUnicode` | | |
| `IsValidCodePage` | | |
| `IsValidLocaleName` | | |
| `LCIDToLocaleName` | | |
| `LCMapStringEx` | | |
| `LocaleNameToLCID` | | |
| `ResolveLocaleName` | | |
| `SetThreadLocale` | | |
| `CompareString` | DEPRECATED | `CompareStringEx` |
| `CompareStringA` | DEPRECATED | `CompareStringEx` |
| `EnumSystemLocalesA` | DEPRECATED | `EnumSystemLocalesEx` |
| `EnumSystemLocalesW` | DEPRECATED | `EnumSystemLocalesEx` |
| `FindNLSString` | DEPRECATED | `FindNLSStringEx` |
| `GetCPInfo` | DEPRECATED | Unicode を使用してください |
| `GetCPInfoExA` | DEPRECATED | Unicode を使用してください |
| `GetCPInfoExW` | DEPRECATED | Unicode を使用してください |
| `GetCurrencyFormatA` | DEPRECATED | `GetCurrencyFormatEx` |
| `GetCurrencyFormatW` | DEPRECATED | `GetCurrencyFormatEx` |
| `GetGeoInfoA` | DEPRECATED | `GetGeoInfoEx` |
| `GetGeoInfoW` | DEPRECATED | `GetGeoInfoEx` |
| `GetLocaleInfoA` | DEPRECATED | `GetLocaleInfoEx` |
| `GetLocaleInfoW` | DEPRECATED | `GetLocaleInfoEx` |
| `GetNumberFormatA` | DEPRECATED | `GetNumberFormatEx` |
| `GetNumberFormatW` | DEPRECATED | `GetNumberFormatEx` |
| `GetUserGeoID` | DEPRECATED | `GetUserDefaultLocaleName` |
| `LCMapStringA` | DEPRECATED | `LCMapStringEx` |
| `LCMapStringW` | DEPRECATED | `LCMapStringEx` |

## Game OS における動作上の注意

Game OS の NLS 関数には、Windows が備えているような完全な言語別の大文字小文字テーブルは含まれていません。照合および大文字小文字操作は、ロケールに関係なく常に **序数 (ordinal)** の値で行われます。

**カルチャに依存する大文字小文字化や並べ替えは、実行時ではなくローカライズ プロセスの一部として実施してください。**

影響を受ける関数:

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

### 照合 (Collation)

| ベース | ワイド | マルチバイト |
| - | - | - |
| `std::collate` | | |
| `strcoll` | `wcscoll` | `_mbscoll` |
| `_stricoll` | `_wcsicoll` | `_mbsicoll` |
| `_strncoll` | `_wcsncoll` | `_mbsncoll` |
| `_strnicoll` | `_wcsnicoll` | `_mbsnicoll` |

### 大文字化

| ベース | バリアント | ワイド バリアント |
| - | - | - |
| `std::toupper` | `toupper` | `towupper` |
| `_toupper` | `_toupper_l` | `_towupper_l` |
| `std::isupper` | `isupper` | `iswupper` |
| `_isupper_l` | `_iswupper_l` | |

### 小文字化

| ベース | バリアント | ワイド バリアント |
| - | - | - |
| `std::tolower` | `tolower` | `towlower` |
| `_tolower` | `_tolower_l` | `_towlower_l` |
| `std::islower` | `islower` | `iswlower` |
| `_islower_l` | `_iswlower_l` | |

> [!NOTE]
>
> この一覧は網羅的なものではありません。他の Standard C++ Library 関数も、影響を受ける API に依存している可能性があります。

## 関連 API ドキュメント

* [XGameRuntime features リファレンス](https://docs.xbox.com/ja-jp/reference/system/xgameruntimefeature/xgameruntimefeature_members.md) — NLS を補完する、GDK のロケール + リージョン表面


## Related topics

- [Economy v2 ローカリゼーション](https://docs.xbox.com/ja-jp/build/game-principles/localization.md)
- [コンソールでサポートされる言語](https://docs.xbox.com/ja-jp/build/game-principles/localization/console-supported-languages.md)
- [PartyChatControl::ConfigureAudioManipulationVoiceStream](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/networking/reference/classes/PartyChatControl/methods/partychatcontrol_configureaudiomanipulationvoicestream.md)
- [Microsoft Game Development Kit (GDK) で Clang を使用する](https://docs.xbox.com/ja-jp/tools/tools-pc/visualstudio/gr-vs-clang.md)
- [サポートされている言語](https://docs.xbox.com/ja-jp/publishing/game-publishing/concepts/metadata-supported-languages.md)
