dev-3bdulrahman/translation-dashboard

Modern Laravel Translation Dashboard

0.1.0 2025-05-03 21:33 UTC

This package is auto-updated.

Last update: 2025-05-03 21:36:26 UTC


README

Translation Dashboard

Build Status Packagist License Latest Stable Version Total Downloads Developer

# Translation Dashboard

A user-friendly dashboard for managing Laravel application translations.

Installation

  1. Add the package to your Laravel application:
composer require dev-3bdulrahman/translation-dashboard

العربية: عند تثبيت الباكج، سيتم تنفيذ جميع الأوامر التالية تلقائيًا:

  • نشر ملفات الإعدادات (php artisan translations:publish-config)
  • نشر الأصول (php artisan translations:publish-assets)
  • نشر ملفات الترحيلات (php artisan translations:publish-migrations)
  • تشغيل الترحيلات (php artisan migrate)
  • استيراد الترجمات الموجودة (php artisan translation:import)
  • البحث عن مفاتيح الترجمة في التطبيق (php artisan translation:find)

لا تحتاج إلى تنفيذ أي أوامر يدويًا، فقط قم بتثبيت الباكج وستكون جاهزًا للاستخدام مباشرة!

English: When installing the package, all of the following commands will be executed automatically:

  • Publish configuration files (php artisan translations:publish-config)
  • Publish assets (php artisan translations:publish-assets)
  • Publish migration files (php artisan translations:publish-migrations)
  • Run migrations (php artisan migrate)
  • Import existing translations (php artisan translation:import)
  • Find translation keys in your application (php artisan translation:find)

You don't need to run any commands manually - just install the package and you're ready to go!

Note: If you need to re-run any of these commands later, you can execute them manually:

php artisan translations:publish-config
php artisan translations:publish-assets
php artisan translations:publish-migrations
php artisan migrate
php artisan translation:import
php artisan translation:find

The assets will be copied to the public/translation-dashboard directory. The package will automatically use these local assets instead of loading them from CDN.

Usage

  1. Visit /translations in your browser to access the dashboard.

  2. Import existing translations:

    • Click on "Import Groups" to import existing translations from your Laravel application.
  3. Find translations:

    • Click on "Find Translations in Files" to scan your application for translation keys.
  4. Edit translations:

    • Select a group from the dropdown menu.
    • Click on any translation to edit it.
    • Click "OK" to save the translation.
  5. Add new translation keys:

    • Enter new keys in the "Add New Keys to Group" section.
    • Click "Add Keys" to add them to the selected group.
  6. Publish translations:

    • Click "Publish Translations" to export the translations back to your Laravel application.

Commands

  • php artisan translation:import: Import translations from the application.
  • php artisan translation:find: Find translations in the application.
  • php artisan translation:export: Export translations to the application.
  • php artisan translation:clean: Clean the translation database.
  • php artisan translation:reset: Reset the translation database.
  • php artisan translations:publish-assets: Publish assets for the Translation Dashboard.
  • php artisan translations:publish-config: Publish the configuration file.
  • php artisan translations:publish-migrations: Publish migration files.

Configuration

You can configure the package by editing the config/translation-manager.php file.

Troubleshooting

Assets not loading

If you're having issues with assets not loading:

  1. Make sure you've published the assets:

    php artisan translations:publish-assets
  2. Check that the assets exist in the public/translation-dashboard directory.

  3. If the assets still don't load, the package will automatically fall back to CDN resources.

  4. If you're using a custom public path, make sure to update your asset URLs accordingly.

Missing translations

If translations are not showing up:

  1. Make sure you've run the migrations:

    php artisan migrate
  2. Import your existing translations:

    php artisan translation:import
  3. Check the database to ensure the translations were imported correctly.

License

This package is open-sourced software licensed under the MIT license.