GithubHelp home page GithubHelp logo

alphalang's Introduction

alphalang

Get alphabets for different languages

Usage

var alphalang = new Alphalang();
console.log(alphalang.iso2EnglishName('sv') + ': ' + alphalang.iso2Uppercase('sv'));

The code above generates this console output:

swedish: ABCDEFGHIJKLMNOPQRSTUVWXYZÅÄÖ

Supported languages

English (en), Russian (ru), Spanish (es), Swedish (sv)

Methods

alphalang.iso2Name(isocode)

Returns the local name of the language (i.e. "русский" for russian or "español" for spanish)

alphalang.iso2EnglishName(isocode)

Returns the english name of the language (i.e. "russian" or "spanish")

alphalang.iso2Uppercase(isocode)

Returns a string containing the letters of the alphabet, in uppercase (e.g. "ABCDEFGHIJKLMNÑOPQRSTUVWXYZ" for spanish)

alphalang.iso2Lowercase(isocode)

Returns a string containing the letters of the alphabet, in lowercase (e.g. "abcdefghijklmnñopqrstuvwxyz" for spanish)

alphalang.iso2Alphabet(isocode)

Returns an object containing both uppercase and lowercase versions of the alphabet. E.g. {"uppercase":"ABCDEFGHIJKLMNÑOPQRSTUVWXYZ","lowercase":"abcdefghijklmnñopqrstuvwxyz"} for spanish.

alphalang.isoCodes()

Returns an array of 2-letter ISO language codes for all the languages the library supports. At the time of writing, it is ["en","es","ru","sv"]

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.