{"id":20424192,"url":"https://github.com/itpey/echoi18n","last_synced_at":"2025-09-19T05:38:29.854Z","repository":{"id":242445723,"uuid":"809479342","full_name":"itpey/echoi18n","owner":"itpey","description":"Echo framework  i18n Middleware.","archived":false,"fork":false,"pushed_at":"2024-06-02T22:11:28.000Z","size":13,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-15T15:00:21.927Z","etag":null,"topics":["echo","echo-framework","echo-middleware","fiber","fiber-framework","go","go-echo","go-lang","go-lib","go-library","go-microservice","golang","i10n","i18n","i18n-tool","i18next-backend","localization","localization-tool","microframework","microservices"],"latest_commit_sha":null,"homepage":"https://github.com/itpey/echoi18n","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/itpey.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-02T19:57:43.000Z","updated_at":"2024-08-16T08:45:42.000Z","dependencies_parsed_at":"2024-06-03T04:38:52.447Z","dependency_job_id":null,"html_url":"https://github.com/itpey/echoi18n","commit_stats":null,"previous_names":["itpey/echoi18n"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itpey%2Fechoi18n","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itpey%2Fechoi18n/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itpey%2Fechoi18n/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itpey%2Fechoi18n/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itpey","download_url":"https://codeload.github.com/itpey/echoi18n/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241966977,"owners_count":20050324,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["echo","echo-framework","echo-middleware","fiber","fiber-framework","go","go-echo","go-lang","go-lib","go-library","go-microservice","golang","i10n","i18n","i18n-tool","i18next-backend","localization","localization-tool","microframework","microservices"],"created_at":"2024-11-15T07:08:53.772Z","updated_at":"2025-09-19T05:38:24.786Z","avatar_url":"https://github.com/itpey.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[//]: # \"Title: echoi18n\"\n[//]: # \"Author: itpey\"\n[//]: # \"Attendees: itpey\"\n[//]: # \"Tags: #itpey #go #echo #i18n #go-lang #http #api #https #echo-i18n #echoi18n #middleware\"\n\n\u003ch1 align=\"center\"\u003e\nEcho i18n Middleware\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\nEcho i18n Middleware is a middleware package for the \u003ca href=\"https://github.com/labstack/echo\"\u003eEcho\u003c/a\u003e web framework that provides internationalization (i18n) support.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://pkg.go.dev/github.com/itpey/echoi18n\"\u003e\n    \u003cimg src=\"https://pkg.go.dev/badge/github.com/itpey/echoi18n.svg\" alt=\"itpey i18n echo middleware Go Reference\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/itpey/echoi18n/blob/main/LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/license/itpey/echoi18n\" alt=\"itpey i18n echo middleware license\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n# Features\n\n- Seamless integration with Echo web framework.\n- Support for loading message bundles in various formats such as YAML.\n- Flexible language negotiation using HTTP Accept-Language header or query parameter.\n- Panic-free message localization with error handling.\n\n# Installation\n\n```bash\ngo get github.com/itpey/echoi18n\n```\n\n# Usage\n\n```go\npackage main\n\nimport (\n\t\"net/http\"\n\n\t\"github.com/itpey/echoi18n\"\n\t\"github.com/labstack/echo/v4\"\n\t\"github.com/nicksnyder/go-i18n/v2/i18n\"\n\t\"golang.org/x/text/language\"\n)\n\nfunc main() {\n\te := echo.New()\n\te.Use(\n\t\techoi18n.NewMiddleware(\u0026echoi18n.Config{\n\t\t\tRootPath:        \"./localize\",\n\t\t\tAcceptLanguages: []language.Tag{language.Chinese, language.English},\n\t\t\tDefaultLanguage: language.Chinese,\n\t\t}),\n\t)\n\te.GET(\"/\", func(c echo.Context) error {\n\t\tlocalize, err := echoi18n.Localize(c, \"welcome\")\n\t\tif err != nil {\n\t\t\treturn echo.NewHTTPError(http.StatusInternalServerError, err.Error())\n\t\t}\n\t\treturn c.String(http.StatusOK, localize)\n\t})\n\te.GET(\"/:name\", func(c echo.Context) error {\n\t\treturn c.String(http.StatusOK, echoi18n.MustLocalize(c, \u0026i18n.LocalizeConfig{\n\t\t\tMessageID: \"welcomeWithName\",\n\t\t\tTemplateData: map[string]string{\n\t\t\t\t\"name\": c.QueryParam(\"name\"),\n\t\t\t},\n\t\t}))\n\t})\n\te.Logger.Fatal(e.Start(\":1323\"))\n}\n```\n\n# Feedback and Contributions\n\nIf you encounter any issues or have suggestions for improvement, please [open an issue](https://github.com/itpey/echoi18n/issues) on GitHub.\n\nWe welcome contributions! Fork the repository, make your changes, and submit a pull request.\n\n# License\n\nechoi18n is open-source software released under the MIT License. You can find a copy of the license in the [LICENSE](https://github.com/itpey/echoi18n/blob/main/LICENSE) file.\n\n# Author\n\nechoi18n was created by [itpey](https://github.com/itpey)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitpey%2Fechoi18n","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitpey%2Fechoi18n","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitpey%2Fechoi18n/lists"}