Socket
Socket
Sign inDemoInstall

@tginternal/language-util

Package Overview
Dependencies
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tginternal/language-util

Language data utility for Tolgee localization tool


Version published
Weekly downloads
112
increased by53.42%
Maintainers
2
Weekly downloads
 
Created
Source

Language util

Suggesting

To get language data suggestions by user input:

import { suggest } from '@tginternal/language-util';

console.log(suggest('cs'));
[
    {
        englishName: 'Czech',
        flags: ['🇨🇿'],
        languageId: 'cs',
        originalName: 'čeština',
    },
    {
        englishName: "Czech (Czechia)",
        flags: ["🇨🇿"],
        languageId: "cs-CZ",
        originalName: "čeština (Česko)"
    },
    {
        englishName: "English",
        flags: (89) ["🇬🇧", "🇺🇸", ...],
        languageId: "en",
        originalName: "English"
    }
    ...
];

Validation

import { isValidLanguageTag } from '@tginternal/language-util';

isValidLanguageTag("cs-CZ") //true
isValidLanguageTag("cs_CZ") //false

FAQs

Package last updated on 24 Apr 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