lang

package module
v2.0.0-...-0f05ceb Latest Latest
Warning

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

Go to latest
Published: May 5, 2024 License: CC-BY-4.0 Imports: 6 Imported by: 0

README

Axolotl locale files

Lint Status

The locale files used by Hypera Development's Axolotl Discord bot.
Note: This Go module is not designed for use in other software, and its use is not supported.

What is Axolotl?

Axolotl is the Discord bot used by Hypera Development to run our Discord servers.
In order to make Axolotl super helpful, we have decided to support multiple locales so that users can easily understand and interact with Axolotl.

This module (hypera.dev/axolotl-lang/v2) contains the translatable locale files used by Axolotl to display messages in Discord.

Supported languages

The current supported locales are:

Contributing

We welcome all contributions! If you have found a mistake or something that can be improved, please feel free to contribute! If you would like to contribute to this project, please see our contributing guide.

We are also looking to translate messages into more languages as well. If you know a language that Axolotl does not currently support, please contribute translations so that we can reach more people who know your language!

License

The content of the locale files (specifically in locales/) are available under Creative Commons BY 4.0, except where otherwise stated.

The other code in this repository is licensed under the MIT License.

Contact

You can contact us in our official Discord server (fastest) or by emailing us at oss@hypera.dev.

Acknowledgements

We are extremely grateful to the amazing individuals who have contributed translations, improvements, fixes and more! Thank you! :D

Documentation

Overview

Package lang provides the locale files used by Hypera Development's Axolotl Discord bot.

Note: This module is not designed for use in other software, and use outside of Axolotl is not supported.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bundle

func Bundle() *i18n.Bundle

func LoadLocales

func LoadLocales() error

func Localize

func Localize(locale discordgo.Locale, id string) string

func LocalizePlural

func LocalizePlural(locale discordgo.Locale, id string, count any) string

func LocalizePluralWithData

func LocalizePluralWithData(locale discordgo.Locale, id string, count any, data Data) string

func LocalizeWithData

func LocalizeWithData(locale discordgo.Locale, id string, data Data) string

func SupportedLocales

func SupportedLocales() []discordgo.Locale

Types

type Data

type Data map[string]any

type Localizer

type Localizer struct {
	*i18n.Localizer
	// contains filtered or unexported fields
}

func GetLocalizer

func GetLocalizer(locale discordgo.Locale) *Localizer

func (*Localizer) Localize

func (l *Localizer) Localize(id string) string

func (*Localizer) LocalizePlural

func (l *Localizer) LocalizePlural(id string, count any) string

func (*Localizer) LocalizePluralWithData

func (l *Localizer) LocalizePluralWithData(id string, count any, data Data) string

func (*Localizer) LocalizeWithData

func (l *Localizer) LocalizeWithData(id string, data Data) string

func (*Localizer) Section

func (l *Localizer) Section(name string) *Localizer

Directories

Path Synopsis
cmd
lang-lint command

Jump to

Keyboard shortcuts

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