Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
language-cultures
Advanced tools
Readme
A ready-to-go language-cultures codes utility
$ npm install --save language-cultures
// import all the module
import languageCultures from 'language-cultures';
languageCultures.getLanguageName('en-US');
// or import the single functions
import { getLanguageName } from 'language-cultures';
getLanguageName('en-US')
It basically exports a few useful functions to list and describe language codes, complete with their respective cultures (e.g. the variants for each country in which is spoken), so for example en-US
, it-IT
, es-ES
, ..
Here are the functions:
Functions (w/ example parameters) | Description | Output |
---|---|---|
listLanguageCodes() | lists all the known language codes | ['af-ZA', 'ar-AE', 'ar-BH', 'ar-DZ', 'ar-EG', ..] |
getLanguageName('en-US') | describes the language | 'English - United States' |
getLanguageCultures('en') | lists all the language cultures of a given language | ['en-AU', 'en-BZ', 'en-CA', 'en-CB', 'en-GB', ..] |
getCountryLanguages('CH') | lists all the languages spoken in a country | ['de-CH', 'fr-CH', 'it-CH'] |
Giovanni Frigo, Developer @Belka
language-cultures is Copyright (c) 2016-2018 Belka srl. It is free software, and may be redistributed under the terms specified in the LICENSE file. (TL;DR: MIT license)
Belka is a Digital Agency specialized in design, mobile applications development and custom solutions. We love open source software! You can see our projects or look at our case studies.
Interested? Hire us to help build your next amazing project.
FAQs
A ready-to-go language-cultures codes utility
The npm package language-cultures receives a total of 169 weekly downloads. As such, language-cultures popularity was classified as not popular.
We found that language-cultures demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.