{"id":13690099,"url":"https://github.com/OnfireNetwork/i18n","last_synced_at":"2025-05-02T06:31:46.837Z","repository":{"id":130984868,"uuid":"219163249","full_name":"OnfireNetwork/i18n","owner":"OnfireNetwork","description":"Internationalization framework for onset packages","archived":false,"fork":false,"pushed_at":"2020-01-29T14:04:43.000Z","size":20,"stargazers_count":8,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-12T15:43:19.325Z","etag":null,"topics":["internationalization","languages","lua","onset"],"latest_commit_sha":null,"homepage":null,"language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OnfireNetwork.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":"2019-11-02T14:12:44.000Z","updated_at":"2021-05-24T00:24:01.000Z","dependencies_parsed_at":"2023-04-03T18:32:19.171Z","dependency_job_id":null,"html_url":"https://github.com/OnfireNetwork/i18n","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OnfireNetwork%2Fi18n","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OnfireNetwork%2Fi18n/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OnfireNetwork%2Fi18n/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OnfireNetwork%2Fi18n/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OnfireNetwork","download_url":"https://codeload.github.com/OnfireNetwork/i18n/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251998607,"owners_count":21678005,"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":["internationalization","languages","lua","onset"],"created_at":"2024-08-02T16:00:43.628Z","updated_at":"2025-05-02T06:31:46.831Z","avatar_url":"https://github.com/OnfireNetwork.png","language":"Lua","funding_links":[],"categories":["Packages and Plugins"],"sub_categories":["Libraries"],"readme":"# i18n\nInternationalization framework for onset packages\n\n## Example\n\npackages/your_package/i18n/en.json\n```json\n{\n  \"player_join\": \"{1} joined the server!\",\n  \"player_quit\": \"{1} left the server!\"\n}\n```\npackages/your_package/script.lua\n```lua\nlocal _ = function(k,...) return ImportPackage(\"i18n\").t(GetPackageName(),k,...) end\nAddEvent(\"OnPlayerJoin\", function(player)\n  AddPlayerChatAll(_(\"player_join\", GetPlayerName(player)))\nend)\nAddEvent(\"OnPlayerQuit\", function(player)\n  AddPlayerChatAll(_(\"player_quit\", GetPlayerName(player)))\nend)\n```\n\n## Config\nBy default it uses \"en\" as language. To select another language for your server you have to create a config.  \ni18n.json\n```json\n{\n  \"language\": \"de\"\n}\n```\nIn case the server language doesn't exist for a package it falls back to en.\nPer player translations aren't implemented yet but i might implement it in the future if s.b. needs this feature.\n\n## Events\nOn the client-side it takes a moment to download the translations.\nOnce the translations are ready the event `OnTranslationReady` is fired. (on the server-side with the player as param)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOnfireNetwork%2Fi18n","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FOnfireNetwork%2Fi18n","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOnfireNetwork%2Fi18n/lists"}