Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nimbusec-oss/go-i18n

Translatable golang templates according to i18next specification
https://github.com/nimbusec-oss/go-i18n

Last synced: about 1 month ago
JSON representation

Translatable golang templates according to i18next specification

Awesome Lists containing this project

README

        

## Go-I18N

[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/nimbusec-oss/go-i18n/blob/master/LICENSE)
[![Go Doc](https://godoc.org/github.com/nimbusec-oss/go-i18n?status.svg)](https://godoc.org/github.com/nimbusec-oss/go-i18n)

## Overview
Go-i18n is a internationalization library for golang using the i18next json format.

## Features
* named intermediates

## Installation
To install this package, run:
```
go get github.com/nimbusec-oss/go-i18n
```

## Documentation

**Load translations**
```
t, err := i18n.NewTranslations("", "en").Load()
```

**Add to FuncMap**
```
template.FuncMap{"T":t.GenerateDefaultTranslate(),}
```

**Use in template**
```
{{ T "" }}
```