Skip to content
/ langmap Public

A Go port of Mozilla's list of all the known languages in their English and Native name with locales.

License

Notifications You must be signed in to change notification settings

rez-go/langmap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

langmap

A Go port of Mozilla's langmap JavaScript package.

Please note that there's already package for getting display names of a language which is located at golang.org/x/text/language/display. It's maintained by Go team. You should give it a look before using this package.

Use this package if you want or need consistency with Mozilla's language names.

Usage

package main

import (
	"fmt"
	"github.com/rez-go/langmap"
)

func main() {
	fmt.Printf("Native en-US => %s\n", langmap.NativeName("en-US"))
	fmt.Printf("Native th => %s\n", langmap.NativeName("th"))
	fmt.Printf("English th => %s\n", langmap.EnglishName("th"))
}

About

A Go port of Mozilla's list of all the known languages in their English and Native name with locales.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published