Socket
Socket
Sign inDemoInstall

@discourse/moment-timezone-names-translations

Package Overview
Dependencies
0
Maintainers
6
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @discourse/moment-timezone-names-translations

Translation files for Moment.js timezone names.


Version published
Weekly downloads
5.1K
increased by16.73%
Maintainers
6
Install size
1.12 MB
Created
Weekly downloads
 

Readme

Source

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.

FAQs

Last updated on 01 Feb 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc