language

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 17, 2026 License: MIT Imports: 1 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

language — locale constants + HTTP status text

import "github.com/downsized-devs/sdk-go/language"

Stability: Stable — see STABILITY.md

Locale identifiers (English, Indonesian, Japanese, Deutsch) and translated HTTP status text. Used by codes and translator.

Features

  • Locale constants: English, Indonesian, Japanese, Deutsch.
  • HTTPStatusText(lang string, code int) string.

Installation

go get github.com/downsized-devs/sdk-go/language

Quick Start

import "github.com/downsized-devs/sdk-go/language"

txt := language.HTTPStatusText(language.Indonesian, 404) // "Tidak ditemukan"

API Reference

Symbol Signature
English, Indonesian, Japanese, Deutsch const string
HTTPStatusText (lang string, code int) string

Dependencies

stdlib only.

Testing

go test ./language/...

Contributing

See CONTRIBUTING.md. Add new locales additively — never re-purpose an existing constant.

Documentation

Index

Constants

View Source
const (
	English    string = "en"
	Indonesian string = "id"
	Japanese   string = "jp"
	Deutsch    string = "de"
)

Variables

This section is empty.

Functions

func HTTPStatusText

func HTTPStatusText(lang string, code int) string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL