{"id":19640579,"url":"https://github.com/daniel-km/omeka-s-module-internationalisation","last_synced_at":"2026-04-03T12:04:28.406Z","repository":{"id":55351333,"uuid":"180154818","full_name":"Daniel-KM/Omeka-S-module-Internationalisation","owner":"Daniel-KM","description":"Omeka S module that allows to switch sites by language and to make relations between translated pages","archived":false,"fork":false,"pushed_at":"2025-08-28T10:20:24.000Z","size":360,"stargazers_count":5,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-26T17:50:57.092Z","etag":null,"topics":["multi-language-support","omeka-s","omeka-s-module"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Daniel-KM.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-04-08T13:27:15.000Z","updated_at":"2025-10-10T11:57:57.000Z","dependencies_parsed_at":"2025-06-09T12:33:12.720Z","dependency_job_id":"26c97a16-2bb3-4c9e-86a6-d9edd9ae594c","html_url":"https://github.com/Daniel-KM/Omeka-S-module-Internationalisation","commit_stats":null,"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"purl":"pkg:github/Daniel-KM/Omeka-S-module-Internationalisation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Daniel-KM%2FOmeka-S-module-Internationalisation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Daniel-KM%2FOmeka-S-module-Internationalisation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Daniel-KM%2FOmeka-S-module-Internationalisation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Daniel-KM%2FOmeka-S-module-Internationalisation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Daniel-KM","download_url":"https://codeload.github.com/Daniel-KM/Omeka-S-module-Internationalisation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Daniel-KM%2FOmeka-S-module-Internationalisation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28876677,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T10:31:27.438Z","status":"ssl_error","status_checked_at":"2026-01-29T10:31:01.017Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["multi-language-support","omeka-s","omeka-s-module"],"created_at":"2024-11-11T14:06:11.164Z","updated_at":"2026-01-29T11:28:47.392Z","avatar_url":"https://github.com/Daniel-KM.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Internationalisation (module for Omeka S)\n=========================================\n\n\u003e __New versions of this module and support for Omeka S version 3.0 and above\n\u003e are available on [GitLab], which seems to respect users and privacy better\n\u003e than the previous repository.__\n\n[Internationalisation] is a module for [Omeka S] to manage translations of the\npublic interface and any strings in themes. It allows to switch between sites\npages and resource pages directly when the sites are managed by language.\n\nA language switcher is available as a page or resource block, so the user has\nonly one click to see the translated page. It can be added manually to the theme\ntoo.\n\nA quick and simple interface can be used to add new strings and translations, in\nany language. The languages in themes are automatically included too.\n\nThis module is designed to translate short strings for sites and admin board\nwhen the translations are in American English, the default languague or Omeka.\n\nTo translate the records of the resources automatically, you can use the module\n[Translate].\n\n\nInstallation\n------------\n\nIt is recommended to install the php extension `intl` to localize some strings,\nin particular numbers and dates. It may or may not be installed by default on\nyour server, so check the system information in the bottom of the admin board of\nOmeka. A warning is added in the config of the module too.\n\nSee general end user documentation for [installing a module].\n\nThis module requires the module [Common], that should be installed first.\n\nThe module [Table] can be used for complex cases where translations are\ndifferent between sites.\n\nThe module uses external libraries, so use the release zip to install it, or use\nand init the source.\n\n* From the zip\n\nDownload the last release [Internationalisation.zip] from the list of releases (the master\ndoes not contain the dependency), and uncompress it in the `modules` directory.\n\n* From the source and for development\n\nIf the module was installed from the source, rename the name of the folder of\nthe module to `Internationalisation`, and go to the root module, and run:\n\n```sh\ncomposer install --no-dev\n```\n\nThen install it like any other Omeka module and follow the config instructions.\n\n**Important**: Read below to display all translations for interface and metadata.\n\n\nUsage\n-----\n\nThe module allows to:\n- add translations not provided by omeka, modules or themes;\n- switch between sites directly to the right page or resource;\n- get translations from the api.\n\n### Add translations\n\nIdeally, the translations should be managed by each module. So if you translate\na module, it is recommended to do a pull request to the maintainer of the module\nto integrate it directly in the module, so all users will have a translated\nmodule.\n\n#### Translations managed by the module\n\nTo add specific strings to the translator, you need to go to the main menu\n\"Translations\", where you can add any needed language.\n\nTo add a new language, set its normalized name according to [BCP 47] and many\nsubsequents standards, for example \"fr\" for international French or \"el-gr\"\ngreek as spoken in Greece. Then fill the text area with translations from\nAmerican English, that is the default in Omeka S, to the locale, for example for\na site in international British English:\n\n```ini\nColor = Colour\nInternationalization = Internationalisation\nLicense = Licence\nMovie = Film\n```\n\nOf course, only strings passed to the function `$translate()` will be translated,\nso you need to check all hard coded strings in themes and to translate them to\nAmerican English inside the theme, then into a specific language in the module\npart.\n\nNote that the specific translations of the modules override the default\ntranslations of Omeka, for example for vocabularies.\n\n#### Tables of translations\n\nFor complex cases, in particular when the same string is translated differently\nbetween sites, it is possible to manage some translations via the module [Table].\n\nThe process is the same than with this module: add a table then translations.\nIf the slug of the table begins with \"translation\", for example \"translation-fr\",\nit will be added automatically in sites with this language. Other tables can be\nadded via a main setting and a site setting.\n\n**Warning**: When a table is updated, the translations should be reindexed via\nthe button in the main page of translations.\n\n#### Translations via the theme\n\nTranslations can be added in the directory \"/language/\" of the theme. The files\nshould be named with the locale. Two formats as supported: po/mo. For po/mo, use\nthe same tools than omeka to edit them. For php, use a simple text editor and\ninclude an array to return, with strings as keys and the translations as values.\n\nSince Omeka S v4, the directory language/ is automatically managed when the file\nconfig/theme.ini contains \"has_translations = true\".\n\n### Translations by site\n\n#### Preparation of linked sites\n\nIn Omeka, each site can have one language and only one. The idea of this module\nis to manage sites by group, each of them (sites) with a specific language. So\neven if you have multiple sites, you can translate them all and keep them\nseparately by group of sites.\n\nThis feature is useful only if the language switcher is added to the theme, that\nrequires custom change to pages or resources pages (see below).\n\n1. Duplicate a site\n\nIt is sometime simpler to start from a clean site instead of to try to fix each\npage. When you add a site, an option allow to duplicate another site with all\npages and settings. Furthermore, each page are related together, even if the\nsite has multiple translations. If the site exists already, you can copy all\npages and settings between sites via the site form in the page \"Site info\".\n\n2. In site admin board\n\nIn the case you didn’t duplicate the site, you have to set the locale setting\nfor all sites you want to translate. It allows to set the language of all pages.\nFurthermore, set the options you want for the display of the values of\ninternationalised properties of the resources in the section Internationalisation.\n\n3. In main settings\n\nSet the groups of all sites that will be translated. For example if you have a\nmain site and three exhibits, or four sites for different libraries:\n\n```\nmy-site-fra, my-site-way, my-site-vie\nmy-exhibit-fra, my-exhibit-vie\nother-exhibit-fra, other-exhibit-vie\nfourth-site\n```\n\nHere, the first site is available in three languages, the second and third ones\nin two languages and the last is not translated (and can be omitted).\n\n4. In site pages\n\nMake the relations between translated pages in each group of sites. For that\npurpose, there is a new field to fill in the site page: the pages that are a\ntranslation of the current page. So select the related pages and translate them.\n\nIt’s important to set relations for all pages, else the language switcher will\ndisplay a \"page doesn’t exist\" error if the user browse to it. Furthemore, it is\nrecommended to use all the same settings, item pools, themes, rights, etc. for\nall related sites so the visitor can browse smoothly. A new feature will allow\nto process that automatically, but it is not available yet.\n\nIn the case where the page is not yet translated, and you want to avoid an\nerror, you can create a page with the block \"Simple Page\", and that display the\nsame content than the specified page. It is useful for pages that are common in\nall the sites too (about, terms and conditions…).\n\nThen, in public front-end, the visitor can switch between sites via a flag.\n\n#### Integration of the language switcher\n\nThe language switcher is not added automatically to the theme. So use blocks or\nthe view helper.\n\n##### Page block and resource block Language Switcher\n\nSimply add the page block or the resource block to your pages and your theme to\ndisplay the language switcher.\n\n##### Theme\n\nThe view helper can be use too, so put it somewhere in the file `layout.phtml`,\ngenerally in the header:\n\n```php\n\u003c?= $this-\u003elanguageSwitcher() ?\u003e\n\u003c?php // Or better, to make the theme more generic and resilient in case of an upgrade: ?\u003e\n\u003c?= $this-\u003egetHelperPluginManager()-\u003ehas('languageSwitcher') ? $this-\u003elanguageSwitcher() : '' ?\u003e\n```\n\nThe partial `common/helper/language-switcher.phtml` view can be themed: simply\ncopy it in your theme and customize it. The helper supports options \"template\"\nand \"locale_as_code\". Other options are passed to the template.\n\n##### Properties\n\nBefore the module version 3.3 (Omeka \u003c 3.0), some changes were required in the\ncore or in the theme. See older readme for them.\n\n### API external requests\n\n#### Translations\n\nTo get the list of all the translations of the interface, you can use the module\n[Api Info] and go to https://example.org/api/infos/translations?locale=fr.\n\nFor a better output (or for people who don’t have a json viewer integrated to\nbrowser), you can add \"\u0026pretty_print=1\" to the url. For a still better output,\nyou can use the module [Next] that doesn’t escape unicode characters by default\n([omeka/omeka-s#1493]).\n\nNote that Omeka doesn’t separate admin and public strings.\n\n#### Translations of api properties, resource class and template labels\n\nTo translate the property labels (for example \"Title\" for dcterms:title), the\nresource class label (\"Book\" for bibo:Book) and the resource template label, the\nclient can add `\u0026use_locale=xx_YY` and `\u0026use_template_label=1` to the api\nqueries. In such way, the api will response for example French \"Auteur\" for the\nproperty \"dcterms:creator\" on a template \"Book\").\n\n\nTODO\n----\n\n- [ ] Return original page when it is not translated in a site, instead of an error (virtual instant mirror page).\n- [ ] Add navigation link for the language switcher.\n- [ ] Add links for easier browsing between translated pages.\n- [x] Add a button to duplicate a site (item pool, pages and navigation, relations).\n- [ ] Add a button to duplicate a page or to append blocks of a page to another one.\n- [x] Add a button to apply settings of another site (except translatable content).\n- [ ] Add automatic selection of the site with the browser language.\n- [ ] Manage sites by group instead of sync manually.\n- [ ] Add a view to display all the languages that are used.\n- [ ] Add a bulk edit to normalize all languages, so fallbacks won't be necessary in  most of the cases. For now, use Bulk Edit.\n- [ ] Add a view to manage fallbacks (site settings?).\n- [ ] Sort by the translated value.\n- [ ] Sort by the translated resource class and template labels.\n- [x] Duplicate settings and pages for an existing site.\n- [ ] Modify the internal urls with the target site one when copying blocks.\n- [ ] Copy of pages: there is no mapping for collecting forms.\n- [ ] Simplify the process to manage fallbacks when there is only one fallback (managed by default).\n\n\nWarning\n-------\n\nUse it at your own risk.\n\nIt’s always recommended to backup your files and your databases and to check\nyour archives regularly so you can roll back if needed.\n\n\nTroubleshooting\n---------------\n\nSee online issues on the [module issues] page on GitLab.\n\n\nLicense\n-------\n\n### Module\n\nThis module is published under the [CeCILL v2.1] license, compatible with\n[GNU/GPL] and approved by [FSF] and [OSI].\n\nThis software is governed by the CeCILL license under French law and abiding by\nthe rules of distribution of free software. You can use, modify and/ or\nredistribute the software under the terms of the CeCILL license as circulated by\nCEA, CNRS and INRIA at the following URL \"http://www.cecill.info\".\n\nAs a counterpart to the access to the source code and rights to copy, modify and\nredistribute granted by the license, users are provided only with a limited\nwarranty and the software’s author, the holder of the economic rights, and the\nsuccessive licensors have only limited liability.\n\nIn this respect, the user’s attention is drawn to the risks associated with\nloading, using, modifying and/or developing or reproducing the software by the\nuser in light of its specific status of free software, that may mean that it is\ncomplicated to manipulate, and that also therefore means that it is reserved for\ndevelopers and experienced professionals having in-depth computer knowledge.\nUsers are therefore encouraged to load and test the software’s suitability as\nregards their requirements in conditions enabling the security of their systems\nand/or data to be ensured and, more generally, to use and operate it in the same\nconditions as regards security.\n\nThe fact that you are presently reading this means that you have had knowledge\nof the CeCILL license and that you accept its terms.\n\n### Libraries\n\nThe [flag icons] are released under the MIT license.\n\n\nCopyright\n---------\n\nThis module was built initialy for [Watau]. Next features were added for various\ndigital libraries, in particular the [Curiothèque] of the [Musée Curie].\n\n* Copyright Daniel Berthereau, 2019-2026 (see [Daniel-KM] on GitLab)\n* Copyright BibLibre, 2017 (see [BibLibre] on GitLab), for the switcher\n\nThis module provides the same features than the [Omeka Classic] plugins [MultiLanguage]\nand [Locale Switcher], adapted for the multi-sites capabilities of Omeka S.\n\n\n[Internationalisation]: https://gitlab.com/Daniel-KM/Omeka-S-module-Internationalisation\n[Omeka S]: https://omeka.org/s\n[Common]: https://gitlab.com/Daniel-KM/Omeka-S-module-Common\n[Translate]: https://gitlab.com/Daniel-KM/Omeka-S-module-Translate\n[Table]: https://gitlab.com/Daniel-KM/Omeka-S-module-Table\n[Internationalisation.zip]: https://gitlab.com/Daniel-KM/Omeka-S-module-Internationalisation/-/releases\n[BCP 47]: https://en.wikipedia.org/wiki/IETF_language_tag\n[installing a module]: https://omeka.org/s/docs/user-manual/modules/#installing-modules\n[`application/src/Api/Representation/AbstractResourceEntityRepresentation.php`]: https://github.com/omeka/omeka-s/blob/v1.4.0/application/src/Api/Representation/AbstractResourceEntityRepresentation.php#L279\n[`application/src/Api/Representation/AbstractResourceEntityRepresentation.php` ]: https://github.com/omeka/omeka-s/blob/v1.4.0/application/src/Api/Representation/AbstractResourceEntityRepresentation.php#L489\n[#1506]: https://github.com/omeka/omeka-s/pull/1506/files\n[omeka/omeka-s#1493]: https://github.com/omeka/omeka-s/pull/1493\n[Api Info]: https://gitlab.com/Daniel-KM/Omeka-S-module-ApiInfo\n[Next]: https://gitlab.com/Daniel-KM/Omeka-S-module-Next\n[module issues]: https://gitlab.com/Daniel-KM/Omeka-S-module-Internationalisation/-/issues\n[CeCILL v2.1]: https://www.cecill.info/licences/Licence_CeCILL_V2.1-en.html\n[GNU/GPL]: https://www.gnu.org/licenses/gpl-3.0.html\n[FSF]: https://www.fsf.org\n[OSI]: http://opensource.org\n[flag icons]: https://github.com/lipis/flag-icon-css\n[Watau]: https://watau.fr\n[Curiothèque]: https://curiotheque.musee.curie.fr\n[Musée Curie]: https://musee.curie.fr\n[BibLibre]: https://github.com/BibLibre\n[MultiLanguage]: https://github.com/patrickmj/multilanguage\n[Locale Switcher]: https://gitlab.com/Daniel-KM/Omeka-plugin-LocaleSwitcher\n[Omeka Classic]: https://omeka.org/classic\n[GitLab]: https://gitlab.com/Daniel-KM\n[Daniel-KM]: https://gitlab.com/Daniel-KM \"Daniel Berthereau\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaniel-km%2Fomeka-s-module-internationalisation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaniel-km%2Fomeka-s-module-internationalisation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaniel-km%2Fomeka-s-module-internationalisation/lists"}