@discourse/moment-timezone-names-translations

中文文档
1.0.0发布于 2022/02/01MIT零依赖近 30 天下载 14.5万

Translation files for Moment.js timezone names.

原始使用文档
文档目录4 节
  1. Moment Timezone Names Translations
  2. Usage
  3. Adding more translations
  4. Known limitations

Moment Timezone Names Translations

This repository provides translation files for timezone names. It should be mostly used in conjuction with Moment Timezone, as this repository provides a helper function (moment.tz.localizedNames()) that supplants a Moment Timezone function (moment.tz.names()).

Usage

Load the language file of your choice from /locales and call moment.tz.localizedNames(). This will return an array of timezone names as below:

{"value":"Africa/Abidjan","name":"أبيدجان","id":"Africa/Abidjan"},
{"value":"Africa/Accra","name":"أكرا","id":"Africa/Accra"},
{"value":"Africa/Addis_Ababa","name":"أديس أبابا","id":"Africa/Addis_Ababa"},
...
{"value":"Pacific/Wallis","name":"واليس","id":"Pacific/Wallis"}

Adding more translations

If you would like to add a missing translation, you can run:

ruby pull-translations.rb --language=ar

where ar is the language code in the Unicode CLDR source: https://unicode.org/repos/cldr/trunk/common/main/ar.xml.

Known limitations

The translations provided by Unicode CLDR do not correspond entirely with the list of timezones used by Moment Timezone.

版本与发布记录

@discourse/moment-timezone-names-translations 共发布 1 个版本,首次发布于 2022/02/01;过去 12 个月发布了 0 个版本。

版本发布日期距今
1.0.0latest2022/02/014 年前

关于 @discourse/moment-timezone-names-translations 的常见问题

@discourse/moment-timezone-names-translations 是什么?

Translation files for Moment.js timezone names.

如何安装 @discourse/moment-timezone-names-translations?

在项目目录运行 npm install @discourse/moment-timezone-names-translations,或使用 pnpm add / yarn add / bun add。

@discourse/moment-timezone-names-translations 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/discourse__moment-timezone-names-translations 是否存在。

@discourse/moment-timezone-names-translations 可以商用吗?

@discourse/moment-timezone-names-translations 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@discourse/moment-timezone-names-translations 的下载量有多少?

根据 npm 官方下载统计,@discourse/moment-timezone-names-translations 在 2026/10/13 – 2026/11/11 这 30 天内被下载 145,174 次,日均约 4,839 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@discourse/moment-timezone-names-translations 还在维护吗?

最新版本 1.0.0 发布于 2022/02/01(4 年前);至今共发布 1 个版本,其中过去 12 个月发布了 0 个;首次发布于 2022/02/01。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。