Load embedded locales

You may want to embed locales with a go-bindata tool within your application executable.

  1. install a go-bindata tool, e.g.

    $ go get -u github.com/go-bindata/go-bindata/...

  2. embed local files to your application

    $ go-bindata -o locales.go ./locales/...

  3. use the LoadAssets method to initialize and load the languages

    ^ The AssetNames and Asset functions are generated by go-bindata

  1. ap.I18n.LoadAssets(AssetNames, Asset, "en-US", "el-GR", "zh-CN")