{"id":21989215,"url":"https://github.com/micropackage/internationalization","last_synced_at":"2025-04-30T11:30:06.846Z","repository":{"id":62528291,"uuid":"235801456","full_name":"micropackage/internationalization","owner":"micropackage","description":"Internationalization (i18n) wrapper for WordPress plugins, themes or libraries","archived":false,"fork":false,"pushed_at":"2023-06-23T08:54:24.000Z","size":23,"stargazers_count":5,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"develop","last_synced_at":"2024-08-09T14:31:38.161Z","etag":null,"topics":["bracketspace","composer-library","i18n","internationalization","micropackage"],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/micropackage.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-01-23T13:34:23.000Z","updated_at":"2023-06-23T08:54:26.000Z","dependencies_parsed_at":"2022-11-02T11:01:10.835Z","dependency_job_id":null,"html_url":"https://github.com/micropackage/internationalization","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micropackage%2Finternationalization","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micropackage%2Finternationalization/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micropackage%2Finternationalization/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micropackage%2Finternationalization/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/micropackage","download_url":"https://codeload.github.com/micropackage/internationalization/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227198231,"owners_count":17746509,"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":["bracketspace","composer-library","i18n","internationalization","micropackage"],"created_at":"2024-11-29T19:28:23.055Z","updated_at":"2024-11-29T19:28:23.546Z","avatar_url":"https://github.com/micropackage.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Internationalization\n\n[![BracketSpace Micropackage](https://img.shields.io/badge/BracketSpace-Micropackage-brightgreen)](https://bracketspace.com)\n[![Latest Stable Version](https://poser.pugx.org/micropackage/internationalization/v/stable)](https://packagist.org/packages/micropackage/internationalization)\n[![PHP from Packagist](https://img.shields.io/packagist/php-v/micropackage/internationalization.svg)](https://packagist.org/packages/micropackage/internationalization)\n[![Total Downloads](https://poser.pugx.org/micropackage/internationalization/downloads)](https://packagist.org/packages/micropackage/internationalization)\n[![License](https://poser.pugx.org/micropackage/internationalization/license)](https://packagist.org/packages/micropackage/internationalization)\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://bracketspace.com/extras/micropackage/micropackage-small.png\" alt=\"Micropackage logo\"/\u003e\n\u003c/p\u003e\n\n## 🧬 About Internationalization\n\nThe Internationalization micropackage is an unified wrapper for both `load_plugin_textdomain` and `load_theme_textdomain` functions.\n\nIt can handle both theme and plugin language packs but also any other 3rd party library, like a translated Composer package.\n\nThe language file must follow the scheme: `{textdomain}-{locale_LOCALE}.mo`.\n\nThis package is compatible with [DocHooks library](https://github.com/micropackage/dochooks).\n\n## 💾 Installation\n\n``` bash\ncomposer require micropackage/internationalization\n```\n\n## 🕹 Usage\n\nCall the action manually:\n\n```php\nuse Micropackage\\Internationalization\\Internationalization;\n\nadd_action( 'init', [ new Internationalization( $textdomain, $full_language_dir_path ), 'load_translation' ] );\n```\n\nUsing [DocHooks library](https://github.com/micropackage/dochooks):\n\n```php\nMicropackage\\DocHooks\\Helper::hook( new Internationalization( $textdomain, $full_language_dir_path ) );\n```\n\nRetrieving full path to the directory:\n\n```php\n$theme_language_dir  = get_template_directory() . '/languages';\n$plugin_language_dir = plugin_dir_path( __FILE__ );\n```\n\n## 📦 About the Micropackage project\n\nMicropackages - as the name suggests - are micro packages with a tiny bit of reusable code, helpful particularly in WordPress development.\n\nThe aim is to have multiple packages which can be put together to create something bigger by defining only the structure.\n\nMicropackages are maintained by [BracketSpace](https://bracketspace.com).\n\n## 📖 Changelog\n\n[See the changelog file](./CHANGELOG.md).\n\n## 📃 License\n\nThis software is released under MIT license. See the [LICENSE](./LICENSE) file for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicropackage%2Finternationalization","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicropackage%2Finternationalization","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicropackage%2Finternationalization/lists"}