• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Time Zone Name Localization
2
3## Use Cases
4
5In a multi-language environment, time zones may be addressed by users in different regions in different ways. To this end, your application needs to localize time zone names to adapt to local user habits.
6
7## How to Develop
8
9For details about how to use related APIs, see [getDisplayName](../reference/apis-localization-kit/js-apis-i18n.md#getdisplayname8).
10
111. Import the **i18n** module.
12   ```ts
13   import { i18n } from '@kit.LocalizationKit';
14   ```
15
162. Localize the time zone name, for example, **America/Sao_Paulo**.
17   ```ts
18   let timezone: i18n.TimeZone = i18n.getTimeZone('America/Sao_Paulo');
19   let timeZoneName: string = timezone.getDisplayName ('zh-Hans', true); // timeZoneName ='Brasília Standard Time'
20   ```
21