GithubHelp home page GithubHelp logo

isabella232 / moment-timezone-names-translations Goto Github PK

View Code? Open in Web Editor NEW

This project forked from discourse/moment-timezone-names-translations

0.0 0.0 0.0 102 KB

Localization for for timezone names used in Moment Timezone

License: MIT License

Ruby 100.00%

moment-timezone-names-translations's Introduction

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.

moment-timezone-names-translations's People

Contributors

pmusaraj avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.