Skip to content

Commit

Permalink
Update: docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Charliego3 committed Jun 21, 2024
1 parent 6531747 commit 6ce2d3b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ package main
import (
"embed"
"fmt"
"github.com/Charliego93/go-i18n/v2"
"github.com/charliego3/go-i18n/v2"
"github.com/gin-gonic/gin"
"golang.org/x/text/language"
"net/http"
Expand Down Expand Up @@ -65,8 +65,11 @@ func main() {

// Use multi loader provider
// Built-in load from file and load from fs.FS
// i18n.Initialize(i18n.NewLoaderWithFS(langFS), i18n.NewLoaderWithPath("./examples/lan1"))))
g := i18n.Initialize(i18n.NewLoaderWithPath("./examples/simple"))
// i18n.Initialize(i18n.NewLoaderWithFS(langFS), i18n.WithLanguageKey("lang"), i18n.WithProvider(i18n.QueryProvider))
g := i18n.Initialize(
i18n.NewLoaderWithPath("./examples/simple"),
i18n.WithProvider(i18n.HeaderProvider)
)
if err := http.ListenAndServe(":9090", g.Handler(engine)); err != nil {
panic(err)
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/Charliego3/go-i18n/v2
module github.com/charliego3/go-i18n/v2

go 1.18

Expand Down

0 comments on commit 6ce2d3b

Please sign in to comment.