lang

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: MIT Imports: 2 Imported by: 0 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.

Documentation

Overview

Package lang is the language of what the program itself says outside the web page: the tray menu, the messages of Windows and the notifications. The page has its own way (i18n.js); both follow the same choice of the person: Settings → Interface → Language, kept as settings.Language ("" as in the system, "ru", "en").

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Current

func Current() string

Current is "ru" or "en": the choice of the person, or, when there is none, the language of the system.

func English

func English() bool

English tells whether the language is English.

func FromTags

func FromTags(tags []string) string

FromTags picks the language of a list of language tags of the system ("ru-RU", "en-US"), the first one counting: Russian if it begins with "ru", English otherwise. With no tags at all it is Russian, the language the program was written in.

func LimitDetail

func LimitDetail(detail, code string, args []string) string

LimitDetail words the reason a torrent stopped seeding from the code and the arguments the engine gives ("limit.ratio" [2.00], "limit.time" [3, d]); detail is the Russian text, used in Russian and for a code not known here.

func SetPreference

func SetPreference(f func() string)

SetPreference tells where the choice of the person is read from (the settings); it is asked each time, so a change in the settings is seen at once.

func System

func System() string

System is the language of the system, from the usual variables of the environment.

func Tr

func Tr(ru string) string

Tr is the text in the current language. The texts are written in Russian; the English of each is here. A text that has no English stays as it is.

Types

This section is empty.

Jump to

Keyboard shortcuts

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