{"id":25210552,"url":"https://github.com/backdrop-contrib/transliteration","last_synced_at":"2025-08-10T19:17:45.610Z","repository":{"id":28563602,"uuid":"32081159","full_name":"backdrop-contrib/transliteration","owner":"backdrop-contrib","description":"NOW IN BACKDROP CORE 🎉 Provides a central transliteration service and sanitizes file names while uploading.","archived":false,"fork":false,"pushed_at":"2022-11-03T21:30:04.000Z","size":318,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":31,"default_branch":"1.x-1.x","last_synced_at":"2025-04-05T05:30:12.846Z","etag":null,"topics":["backdrop","cms"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/backdrop-contrib.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.txt","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-12T14:24:51.000Z","updated_at":"2022-10-22T21:46:09.000Z","dependencies_parsed_at":"2023-01-14T09:03:43.962Z","dependency_job_id":null,"html_url":"https://github.com/backdrop-contrib/transliteration","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/backdrop-contrib/transliteration","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/backdrop-contrib%2Ftransliteration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/backdrop-contrib%2Ftransliteration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/backdrop-contrib%2Ftransliteration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/backdrop-contrib%2Ftransliteration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/backdrop-contrib","download_url":"https://codeload.github.com/backdrop-contrib/transliteration/tar.gz/refs/heads/1.x-1.x","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/backdrop-contrib%2Ftransliteration/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269775481,"owners_count":24474003,"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","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["backdrop","cms"],"created_at":"2025-02-10T13:20:53.464Z","updated_at":"2025-08-10T19:17:45.542Z","avatar_url":"https://github.com/backdrop-contrib.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Transliteration\n=================\n\n**Important note**: Transliteration module was moved into Backdrop core in version \n1.3.0. Use of this module is no longer necessary and no further changes will be \nmade here. If you would like to report a bug or feature request against \nTransliteration module, file an issue in the main Backdrop CMS core repository \nat https://github.com/backdrop/backdrop-issues.\n\nProvides a central transliteration service to other Backdrop modules, and\nsanitizes file names while uploading.\n\n## Installation\n\n-   Install this module using the official Backdrop CMS instructions at\n    https://backdropcms.org/guide/modules.\n\n-   If you are installing to an existing Backdrop site, you might want to fix\n    existing file names after installation, which will update all file names\n    containing non-ASCII characters. However, if you have manually entered links\n    to those files in any contents, these links will break since the original\n    files are renamed. Therefore it is a good idea to test the conversion\n    first on a copy of your web site. You'll find the retroactive conversion at\n    Configuration \u003e\u003e Media \u003e\u003e File system \u003e\u003e Transliteration.\n\n## Configuration\n\nThis module doesn't require special permissions.\n\nThis module can be configured from the File system configuration page\n(Configuration \u003e\u003e Media \u003e\u003e File system \u003e\u003e Settings).\n\n*   Transliterate file names during upload: If you need more control over the\n    resulting file names you might want to disable this feature here and install\n    the FileField Paths module instead.\n\n*   Lowercase transliterated file names: It is recommended to enable this option\n    to prevent issues with case-insensitive file systems.\n\n## 3rd Party integration\n\nThird party developers seeking an easy way to transliterate text or file names\nmay use transliteration functions as follows:\n\n```php\nif (function_exists('transliteration_get')) {\n  $transliterated = transliteration_get($text, $unknown, $source_langcode);\n}\n```\n\nor, in case of file names:\n\n```php\nif (function_exists('transliteration_clean_filename')) {\n  $transliterated = transliteration_clean_filename($filename, $source_langcode);\n}\n```\n\nNote that the optional $source_langcode parameter specifies the language code\nof the input. If the source language is not known at the time of transliter-\nation, it is recommended to set this argument to the site default language:\n\n```php\n$output = transliteration_get($text, '?', language_default('language'));\n```\n\nOtherwise the current display language will be used, which might produce\ninconsistent results.\n\n## Language specific replacements\n\nThis module supports language specific variations in addition to the basic\ntransliteration replacements. The following guide explains how to add them:\n\n1.  First find the Unicode character code you want to replace. As an example,\n    we'll be adding a custom transliteration for the cyrillic character 'г'\n    (hexadecimal code 0x0433) using the ASCII character 'q' for Azerbaijani\n    input.\n\n2.  Transliteration stores its mappings in banks with 256 characters each. The\n    first two digits of the character code (04) tell you in which file you'll\n    find the corresponding mapping. In our case it is data/x04.php.\n\n3.  If you open that file in an editor, you'll find the base replacement matrix\n    consisting of 16 lines with 16 characters on each line, and zero or more\n    additional language-specific variants. To add our custom replacement, we need\n    to do two things: first, we need to create a new transliteration variant\n    for Azerbaijani since it doesn't exist yet, and second, we need to map the\n    last two digits of the hexadecimal character code (33) to the desired output\n    string:\n\n    ```php\n    $variant['az'] = array(0x33 =\u003e 'q');\n    ```\n\n    (see http://people.w3.org/rishida/names/languages.html for a list of\n    language codes).\n\n    Any Azerbaijani input will now use the appropriate variant.\n\nAlso take a look at data/x00.php which already contains a bunch of language\nspecific replacements. If you think your overrides are useful for others please\nfile a patch at http://drupal.org/project/issues/transliteration.\n\n## License\n\nThis project is GPL v2 software. See the LICENSE.txt file in this directory for\ncomplete text.\n\n## Credits\n\nAuthors:\n* Stefan M. Kudwien (smk-ka) - http://drupal.org/user/48898\n* Daniel F. Kudwien (sun) - http://drupal.org/user/54136\n\nMaintainers:\n* Andrei Mateescu (amateescu) - http://drupal.org/user/729614\n\nBackdrop maintainer:\n* Jérôme Danthinne (jdanthinne) - https://github.com/jdanthinne/ \n\nUTF-8 normalization is based on UtfNormal.php from MediaWiki\n(http://www.mediawiki.org) and transliteration uses data from Sean M. Burke's\nText::Unidecode CPAN module\n(http://search.cpan.org/~sburke/Text-Unidecode-0.04/lib/Text/Unidecode.pm).\n\n## Useful resources\n\nUnicode Code Converter:\nhttp://people.w3.org/rishida/tools/conversion/\n\nUTF-8 encoding table and Unicode characters:\nhttp://www.utf8-chartable.de/unicode-utf8-table.pl\n\nCountry codes:\nhttp://www.loc.gov/standards/iso639-2/php/code_list.php\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbackdrop-contrib%2Ftransliteration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbackdrop-contrib%2Ftransliteration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbackdrop-contrib%2Ftransliteration/lists"}