Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

theRealProHacker/iso-codes

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

iso-codes

This repository contains ISO-639-1 and ISO-639-3 Language Code dictionaries.

Usage

A short python code example to use this dictionary. To do this you have to put the iso-639-1/iso_simp.min.json file into your filesystem with the python script

  #python
  import json #the advantage is that you have no new dependencies
  def get_language_as_iso_code():
    #some function that returns an ISO-639-1-Code
    return "en"
  with open("iso_simp.min.json","r") as file:
    iso_codes=json.load(file)
  myISOCode=get_language_as_iso_code()
  print(iso_codes[myISOCode]) #-> "english"

Another example in JavaScript

  //javaScript
  function get_language_as_iso_code(){
    return "en"
  }
  let iso_codes=require("iso_simp.min.json")
  let myISOCode=get_language_as_iso()
  console.log(iso_codes[myISOCode])

About

This repository contains ISO-639-1 and ISO-639-3 Language Code dictionaries.

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Morty Proxy This is a proxified and sanitized view of the page, visit original site.