Skip to content

Commit

Permalink
Updated naming convention
Browse files Browse the repository at this point in the history
  • Loading branch information
YamiOdymel committed May 21, 2023
1 parent 802e8bd commit d21677e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ func main() {
}
```

Filenames like `zh_TW.json`, `zh-tw.json` `zh_tw.user.json`, `zh-TW.music.json` will be combined to a single `zh-tw` translation (case-insenstive and the suffixes are ignored).
Filenames like `zh-tw.json` `zh-tw.user.json` will be combined to a single `zh-tw` translation.

No matter if you are naming them like `zh_TW`, `zh-tw` or `ZH_Tw`, they will always be converted to `zh-tw`.

 

Expand All @@ -126,6 +128,8 @@ locale.String("message_basic")
locale.String("message_what_is_this")
```

Languages named like `zh_TW`, `zh-tw` or `ZH_Tw`, `NewLocale` will always convert them to `zh-tw`.

 

### Passing Data to Translation
Expand Down

0 comments on commit d21677e

Please sign in to comment.