Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/laipz8200/i18n
https://github.com/laipz8200/i18n
Last synced: 21 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/laipz8200/i18n
- Owner: laipz8200
- License: other
- Created: 2023-01-30T06:40:05.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2023-01-31T01:18:42.000Z (almost 2 years ago)
- Last Synced: 2024-10-11T14:58:06.219Z (about 1 month ago)
- Language: Go
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-i18n
## Install
```
go get github.com/laipz8200/i18n
```## Usage
```
cat i18n/zh-cn.yamlwelcome: 欢迎
``````go
package mainimport (
"fmt""github.com/laipz8200/i18n"
)func main() {
t := i18n.Lang("zh-cn").Sprintf("welcome")
fmt.Println(t)
}
```for more example see test case.