Skip to content
/ lol Public

A CLI tool to get local and english language names from a directory of locales.

License

Notifications You must be signed in to change notification settings

olizilla/lol

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lol - locale-to-language

A CLI tool to get local and english language names from a directory of locales.

Language names are pulled from mozilla/language-mapping-list

Install

npm install -g @olizilla/lol

or just use it via npx

npx -q @olizilla/lol public/locales > src/lib/languages.json

Usage

In your favorite shell, pass lol the directory where you keep your locales

$ ls ~/Code/ipfs-shipyard/ipfs-webui/public/locales/ | grep zh
zh-CN
zh-HK
zh-TW

$ lol ~/Code/ipfs-shipyard/ipfs-webui/public/locales/
{
  "uk": {
    "locale": "uk",
    "nativeName": "Українська",
    "englishName": "Ukrainian"
  },
  "zh-CN": {
    "locale": "zh-CN",
    "nativeName": "中文(中国)",
    "englishName": "Chinese Simplified (China)"
  },
  "zh-HK": {
    "locale": "zh-HK",
    "nativeName": "中文(香港)",
    "englishName": "Chinese Traditional (Hong Kong)"
  },
  "zh-TW": {
    "locale": "zh-TW",
    "nativeName": "中文(台灣)",
    "englishName": "Chinese Traditional (Taiwan)"
  }
}

About

A CLI tool to get local and english language names from a directory of locales.

Resources

License

Stars

Watchers

Forks

Packages

No packages published