Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@localazy/languages

Package Overview
Dependencies
Maintainers
0
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@localazy/languages

Available Localazy Languages

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
0
Weekly downloads
 
Created
Source

@localazy/languages

This repository contains all the ISO 639 languages supported by Localazy. There are various forms of the content you may use.

Insallation

npm i @localazy/languages

TypeScript

Locales enum

One of the exported content is an enum file with all the locales in form of ENGLISH_LANGUAGE_NAME = "language_code", e.g. CZECH_CZECHIA = CZECH_CZECHIA = "cs_CZ";

import { Locales } from "@localazy/languages";

// ...

const czechia = locales.CZECH_CZECHIA;

Language resolver

Second typescript file provides following functions

import { getLocalazyLanguages } from "@localazy/languages";

console.log(getLocalazyLanguages());

// prints
// [
//  {
//      "important": true,
//      "localazyId": 0,
//      "name": "Latin American Spanish",
//      "rtl": false,
//      "locale": "es_419",
//      "englishName": "Latin American Spanish"
//  },
//  ...
// ]
import { findLocalazyLanguageByLocale } from "@localazy/languages";

console.log(findLocalazyLanguageByLocale("cs_CZ"));

// prints
// {
//       "important": false,
//       "localazyId": 61,
//       "name": "Czech (Czechia)",
//       "rtl": false,
//       "locale": "cs_CZ",
//       "englishName": "Czech (Czechia)"
// }

The language object implements the Language type which you may import as import { Language } from "@localazy/languages";

JSON Languages overview

This repository also contains JSON overview of languages that have been translated in native language in Localazy. If you miss some language or find inaccurate translation, we will appreciate your contribution.

You may import the languages list like this.

import { languagesList} from "@localazy/languages";

Keywords

FAQs

Package last updated on 26 Aug 2024

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc