# generaltranslation: General Translation Core SDK: LocaleProperties URL: https://generaltranslation.com/zh/docs/core/types/locale-properties.mdx --- title: LocaleProperties description: 包含完整区域设置信息的 TypeScript 接口 --- ## 概述 `LocaleProperties` 提供某个区域设置的详细语言和地域信息。 ```typescript interface LocaleProperties { code: string; name: string; nativeName: string; languageCode: string; languageName: string; nativeLanguageName: string; nameWithRegionCode: string; nativeNameWithRegionCode: string; regionCode: string; regionName: string; nativeRegionName: string; scriptCode: string; scriptName: string; nativeScriptName: string; maximizedCode: string; maximizedName: string; nativeMaximizedName: string; minimizedCode: string; minimizedName: string; nativeMinimizedName: string; emoji: string; } ``` `getLocaleProperties` 方法的返回值。 ## 关键属性 | 属性 | 说明 | | --------------- | ------------------- | | `code` | 原始区域设置代码 | | `name` | 源语言中的显示名称 | | `nativeName` | 本地语言中的显示名称 | | `languageCode` | 基础语言代码 | | `regionCode` | ISO 区域代码 | | `scriptCode` | ISO 书写系统代码 | | `maximizedCode` | 包含可能的书写系统/区域的区域设置代码 | | `minimizedCode` | 最短的有效区域设置代码 | | `emoji` | 旗帜 Emoji | ## 示例 ### 基本用法 ```typescript const gt = new GT({ sourceLocale: 'en-US' }); const props = gt.getLocaleProperties('de-AT'); console.log(props.name); // "Austrian German" console.log(props.nativeName); // "Österreichisches Deutsch" console.log(props.emoji); // "🇦🇹" ``` ## 相关类型 * [`getLocaleProperties`](/docs/core/class/methods/locales/get-locale-properties) - 用于返回此接口的方法