{"id":21890936,"url":"https://github.com/statikbe/laravel-nova-chained-translation-manager","last_synced_at":"2025-04-15T13:39:47.666Z","repository":{"id":49755965,"uuid":"319287183","full_name":"statikbe/laravel-nova-chained-translation-manager","owner":"statikbe","description":"A translation manager tool for Laravel Nova, that makes use of the Laravel Chained Translator.","archived":false,"fork":false,"pushed_at":"2024-03-14T16:01:55.000Z","size":11366,"stargazers_count":15,"open_issues_count":1,"forks_count":13,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-04-27T08:04:10.755Z","etag":null,"topics":["laravel","nova","tailwindcss","vue"],"latest_commit_sha":null,"homepage":"","language":"Vue","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/statikbe.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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":"2020-12-07T10:43:32.000Z","updated_at":"2024-04-24T15:50:32.000Z","dependencies_parsed_at":"2024-03-14T17:26:11.756Z","dependency_job_id":"4d2415b0-381a-440c-8d27-3679e6f9c096","html_url":"https://github.com/statikbe/laravel-nova-chained-translation-manager","commit_stats":{"total_commits":131,"total_committers":12,"mean_commits":"10.916666666666666","dds":0.6946564885496183,"last_synced_commit":"50d97baf7b2eb0d7cc28cc2ffa6fbe89657a9fb6"},"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/statikbe%2Flaravel-nova-chained-translation-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/statikbe%2Flaravel-nova-chained-translation-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/statikbe%2Flaravel-nova-chained-translation-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/statikbe%2Flaravel-nova-chained-translation-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/statikbe","download_url":"https://codeload.github.com/statikbe/laravel-nova-chained-translation-manager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249081516,"owners_count":21209712,"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":["laravel","nova","tailwindcss","vue"],"created_at":"2024-11-28T12:18:19.466Z","updated_at":"2025-04-15T13:39:47.650Z","avatar_url":"https://github.com/statikbe.png","language":"Vue","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003cimg src=\"/assets/card.png\" alt=\"Card of Laravel Nova Chained Translation Manager\"\u003e\u003c/p\u003e\n\n# Laravel Nova Chained Translation Manager\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/statikbe/laravel-nova-chained-translation-manager.svg?style=flat-square)](https://packagist.org/packages/statikbe/laravel-nova-chained-translation-manager)\n[![Total Downloads](https://img.shields.io/packagist/dt/statikbe/laravel-nova-chained-translation-manager.svg?style=flat-square)](https://packagist.org/packages/statikbe/laravel-nova-chained-translation-manager)\n\n## NOTE: If you are looking for nova 3 check out [branch 3.0](https://github.com/statikbe/laravel-nova-chained-translation-manager/tree/3.0)\n\nThe Laravel Nova Chained Translation Manager allows you to easily edit the translations of your current Laravel environment.\nThis translation manager uses the Laravel Chained Translator, that enables you to override the default translations with\ntranslations for a specific environment, e.g. a content manager can independently edit and override the translation files\non the production environment from the translations provided by the developers.\n\nTypically at some point during the development phase, a content manager wants to translate or finetune the translation\nstrings added by developers. This often results in merge and versioning issues, when developers and content managers\nare working on the translation files at the same time.\n\nThe Chained Translator package allows translations created by developers to exist separately from translations edited by\nthe content manager in separate `lang` directories. The library merges the translations of both language directories,\nwhere the translations of the content manager (the custom translations) override those of the developer (the default\ntranslations). Check the documentation of the [Laravel Chained Translator](https://github.com/statikbe/laravel-chained-translator)\nfor more info.\n\n## Features\n\n- Save translations of the current environment to separate translation files in a separte language directory to avoid\n  version conflicts.\n- Immediately save translations\n- Search for translations and translation keys\n- Filter translations for specific groups and languages\n- Only show keys with missing translations\n- Support for **Nova 4**\n\nCurrently, this tool does not provide features to add new translation keys, because our target users are translators and\ncontent managers and we want to avoid that they add unnecessary translation keys.\n\n## Installation\n\nThe package can be installed through Composer.\n\n```\ncomposer require statikbe/laravel-nova-chained-translation-manager\n```\n\nNova 4 support starts from version v3.0.0. If you are still using Nova 3, please use the **v2 version**. \n\n```\ncomposer require statikbe/laravel-nova-chained-translation-manager:~2\n```\n\nNext enable the tool in Nova.\nGo to `app/Providers/NovaServiceProvider.php` and add the TranslationManager to the tools.\n```php\nuse Statikbe\\NovaTranslationManager\\TranslationManager;\n\n    public function tools()\n    {\n        return [\n            new TranslationManager,\n        ];\n    }\n\n```\n\n## Configuration\n\nYou can configure the custom language directory name and extend or finetune the service provider of the Laravel Chained\nTranslator. Have a look at the configuration options of the [Laravel Chained Translator library](https://github.com/statikbe/laravel-chained-translator).\n\n### Supported locales\n\nThere are two ways to change the supported locales.\n\n#### Option 1\nPublish the config file with the command below and configure it with your supported locales and editor preferences.\n\n```shell\nphp artisan vendor:publish --tag=nova-chained-translation-manager\n```\n\nE.g.\n```php\n    /*\n    |--------------------------------------------------------------------------\n    | Application Supported Locale Configuration\n    |--------------------------------------------------------------------------\n    |\n    | The application locale determines the possible locales that can be used.\n    | You are free to fill this array with any of the locales which will be \n    | supported by the application.\n    |\n    */\n\n    'supported_locales' =\u003e [\n        'en',\n        'nl'\n    ],\n```\n\n#### Option 2\nIf your application already has a config that declares your locales than you are able to set the supported locales in\nany service provider. Create a new one or use the `app/Providers/AppServiceProvider.php` and set the supported locales\nas an array in the boot function as follows:\n\n```php\nuse Statikbe\\NovaTranslationManager\\TranslationManager;\n\npublic function boot()\n{\n    TranslationManager::setLocales(['en', 'nl']);\n}\n```\n\n### Changing your Editor\nIts possible also to change your editor, sometimes the translations values can get big and its good if you have a larger area\nto edit them or even add some bold/underline effects on the fly. You can use 3 supported values: `input`, `textarea`, `trix`. Their names are\nself-explanatory.\n\n**NOTE:** We do not recommend Trix as an editor, because if you use variables in your translations within HTML,\ne.g. for the url of an anchor tag, Trix will remove it :-(.\nPlease, keep in mind while using Trix you should also configure your allowed HTML tags.\n\nDon't forget to clear the cache after changing these settings and refresh your page to see the results :-)\n\nE.g.\n```php\n    /*\n    |--------------------------------------------------------------------------\n    | Editor to use\n    |--------------------------------------------------------------------------\n    |\n    | Choose what type of editor you want to use while editing your translations\n    | input - For really dead simple input\n    | textarea - For a larger textarea to deal with\n    | trix - Will use Trix Editor for editing locales supporting some HTML on it.\n    |\n    | Note : Please keep in mind while using Trix to configure your allowed HTML\n    | tags. Otherwise it may pose XSS attacks risk if field could be edited by the end user.\n    |\n    | Values : trix, input, textarea\n    |\n    */\n\n    'editor' =\u003e 'input',\n    'trix_allowed_tags' =\u003e '\u003ccode\u003e\u003cp\u003e\u003cb\u003e\u003cu\u003e\u003ca\u003e\u003cbr\u003e\u003cul\u003e\u003cli\u003e\u003col\u003e\u003cpre\u003e\u003ch2\u003e\u003ch3\u003e\u003ch4\u003e\u003ch5\u003e\u003cdel\u003e\u003cblockquote\u003e\u003cdl\u003e\u003cdd\u003e\u003cstrong\u003e',\n```\n\n### Ignoring Groups\nYou may also ignore certain groups of translations to be shown in the Nova UI. Create an array with keys that you want to ignore:\n\nE.g.\n```php\n    /*\n    |--------------------------------------------------------------------------\n    | Ignore Groups\n    |--------------------------------------------------------------------------\n    | This will ignore certain groups from the translations UI\n    | Supports an array of keys\n    |\n    */\n\n    'ignore_groups' =\u003e ['auth','pagination','passwords','routes','nova','nova/validation'],\n```\n\n## Merging translations\n\nYou can combine the custom translations of the current environment with the default translation files, by running the\ncommand provided by the [Laravel Chained Translator library](https://github.com/statikbe/laravel-chained-translator) package.\n\n## Credits\n\nWe used [Joe Dixon's](https://github.com/joedixon) translation libraries as a source of technical expertise and inspiration:\n- [Laravel Translation](https://github.com/joedixon/laravel-translation)\n- [Nova Translation](https://github.com/joedixon/nova-translation)\n\n[@nelumoraru](https://github.com/nelumoraru) and [@FrittenKeeZ](https://github.com/FrittenKeeZ) upgraded the library for Nova 4.\n\nThanks a lot for the great work!\n\n## License\nThe MIT License (MIT). Please see [license file](LICENSE.md) for more information.\n\n## Screenshots\n\n![Overview](docs/chained-translation-manager.gif \"Overview of the Chained Translation Manager\")\n\n![Select different languages](docs/chained-translation-manager-select-lang.png \"Only show selected languages\")\n\n![Select different groups](docs/chained-translation-manager-select-group.png \"Only show selected groups\")\n\n![Only show missing translations](docs/chained-translation-manager-select-group.png \"Only show the translations that are missing\")\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstatikbe%2Flaravel-nova-chained-translation-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstatikbe%2Flaravel-nova-chained-translation-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstatikbe%2Flaravel-nova-chained-translation-manager/lists"}