Supported Languages for Marty Media Server
Find a file
Martin Riedl c1dfe8ecda
All checks were successful
Build and Release / Checks (push) Successful in 30s
Build and Release / Code Coverage (push) Successful in 43s
Build and Release / Code Coverage-1 (push) Successful in 43s
Build and Release / Build (push) Successful in 24s
Build and Release / Build-1 (push) Successful in 34s
Build and Release / Semantic Release (push) Successful in 21s
docs: new readme
2026-06-21 00:22:55 +02:00
.forgejo/workflows ci: new build and release pipeline 2026-06-21 00:09:42 +02:00
.gitignore feat: initial check in 2026-06-20 23:14:12 +02:00
.releaserc ci: new build and release pipeline 2026-06-21 00:09:42 +02:00
go.mod fix: downgrade of golang requirements 2026-06-20 23:16:17 +02:00
iso639.go feat: new apache license 2026-06-21 00:09:31 +02:00
iso639.json feat: initial check in 2026-06-20 23:14:12 +02:00
iso639_test.go feat: new apache license 2026-06-21 00:09:31 +02:00
LICENSE.txt feat: new apache license 2026-06-21 00:09:31 +02:00
README.md docs: new readme 2026-06-21 00:22:55 +02:00

golanguage

A Go library providing lookup maps for ISO 639 language codes used in the Marty Media Server.

Features

  • ISO 639-2 lookup — by both iso639-2T (terminologic) and iso639-2B (bibliographic) codes
  • ISO 639-3 lookup — by 3-letter identifier
  • Zero runtime I/O — data is embedded via //go:embed, no external files needed
  • Package-level maps — lookups are available as package variables, parsed once at init

Installation

go get git.martin-riedl.de/marty-media/golanguage

Example

package main

import (
	"fmt"

	language "git.martin-riedl.de/marty-media/golanguage"
)

func main() {
	// Lookup by ISO 639-3 code
	if lang, ok := language.ISO639_3["deu"]; ok {
		fmt.Printf("Name: %s\n", lang.Name)                // German
		fmt.Printf("ISO 639-1: %s\n", lang.ISO639_1)       // de
		fmt.Printf("Local name: %s\n", lang.LocalizedName) // Deutsch
	}

	// Lookup by ISO 639-2B code
	if lang, ok := language.ISO639_2["fre"]; ok {
		fmt.Printf("Name: %s\n", lang.Name)            // French
		fmt.Printf("ISO 639-1: %s\n", lang.ISO639_1)   // fr
	}
}

License

Copyright 2026 Martin Riedl. Licensed under the Apache License, Version 2.0.