{"id":28471805,"url":"https://github.com/peburrows/translator","last_synced_at":"2026-02-11T10:32:45.003Z","repository":{"id":437042,"uuid":"58121","full_name":"peburrows/translator","owner":"peburrows","description":"Radiant extension for simple, elegant language localization","archived":false,"fork":false,"pushed_at":"2008-09-30T20:18:43.000Z","size":105,"stargazers_count":7,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-07T11:08:50.656Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://blog.philburrows.com/articles/2008/02/21/and-were-back/","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/peburrows.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2008-09-30T20:18:41.000Z","updated_at":"2019-08-13T13:36:46.000Z","dependencies_parsed_at":"2022-07-14T13:01:11.885Z","dependency_job_id":null,"html_url":"https://github.com/peburrows/translator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/peburrows/translator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peburrows%2Ftranslator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peburrows%2Ftranslator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peburrows%2Ftranslator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peburrows%2Ftranslator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peburrows","download_url":"https://codeload.github.com/peburrows/translator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peburrows%2Ftranslator/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263046021,"owners_count":23405118,"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":[],"created_at":"2025-06-07T11:08:56.079Z","updated_at":"2026-02-11T10:32:44.994Z","avatar_url":"https://github.com/peburrows.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"= Translator Extension\n\nCreated By: Phil Burrows, January 2008\npeburrows@gmail.com\nhttp://philburrows.com\nhttp://dev.philburrows.com/svn/radiant-extensions/translator/trunk\n\n-------------------------\n\n== Description\n\nThis extension allows for different page parts to be rendered\ndepending on the user's Accept-Language header.\n\n== Disclaimer\n\nThis extension works well for me, but YMMV.\n\n== Dependencies\n\n* None, really\n\n== Usage\n\nIn the pages you wish to have different languages available,\nsimply create a page part with a two letter language abbreviation\nsuffix for every part you wish to have available in multiple languages.\nDefaults to English if a page part is not defined that matches the\nuser's requested language.\n\nNOTE: the default language is english, so page parts without the\ntwo-letter language suffix will be considered english.\n\nExamples:\n---------\nPage Parts:\n  'body' (English)\n  'body_de' (German translation)\n  'body_fr' (French translation)\n  \n  'sidebar' (English)\n  'sidebar_de' (German translation)\n  'sidebar_fr' (French translation)\n\nThen, in your layout, simply use the translator tags the same way you would use the standard Radiant content tag\n\n\u003cr:translator:content name=\"body\" /\u003e\n\u003cr:translator:content name=\"sidebar\" inherit=\"true\" /\u003e\n\neach of these will render the appropriate page part, determined by the browser's Accept-Language\n\nYou can also take advantage of the \u003cr:translator:title /\u003e tag which will render the normal page title by default,\nbut will first check for a config page part that specifies other titles for the different languages.\nSample config page part --\u003e\n\ntranslator:\n  es:\n    title: éste es el título\n  de:\n    title: dieses ist der titel\n\nAlso, if you wish to allow the user to explicitly set their language\n(instead of relying on the browser sending the proper Accept-Language header),\nthis extension utilizes session variables (and an included controller to\nset those variables) which override the Accept-Language header.\nJust hit '/language/set/:lang' and replace :lang with the two-letter language\nabbreviation. Also, hitting '/language/set/reset' will clear the session\nvariable and fall-back to relying on the Accept-Language header.\n\nTODO:\n* allow setting of the default language to something other than English\n* support the four letter language abbreviations in the form of lang-REGION (en-US, fr-CA, fr-FR, etc.)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeburrows%2Ftranslator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeburrows%2Ftranslator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeburrows%2Ftranslator/lists"}