Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/nimbusec-oss/go-i18n
- Owner: nimbusec-oss
- License: mit
- Created: 2018-03-23T15:43:27.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2021-08-31T13:10:08.000Z (over 3 years ago)
- Last Synced: 2024-06-20T10:17:07.489Z (7 months ago)
- Language: Go
- Size: 19.5 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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 "" }}
```