Download the PHP package wecansync/laravel-translations without Composer

On this page you can find all versions of the php package wecansync/laravel-translations. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-translations

Laravel Translation Manager

Current version Monthly Downloads Total Downloads License PHP Version

Overview

Laravel Translation Management is a powerful, database-driven translation package that simplifies multi-language content management in Laravel applications. Store translations in dedicated database tables with automatic management through Eloquent events.

Features

Installation

Install the package via Composer:

Publish the configuration file:

This will create config/laravel-translations.php with default settings.

Quick Start

1. Create Database Tables

You need three types of tables:

Languages table:

Main model table (e.g., products):

Translation table (e.g., products_translations):

2. Set Up Your Models

Main Model (Product.php):

Translation Model (ProductTranslation.php):

3. Use in Your Application

Store with translations:

Retrieve translations:

Advanced Usage

Configuration Options

The $translation_model property accepts the following options:

Global Configuration

Edit config/laravel-translations.php:

Form Structure

Create forms with nested arrays using language IDs as keys:

Manual Translation Management

Use withTranslations() for batch operations or when routes are skipped:

Deleting Translations

API Methods

Use Cases

E-commerce Products

Blog Posts

Categories with Skip Routes

How It Works

  1. Automatic Saving: When you save a model, the saved event triggers translation management
  2. Request Extraction: Translations are extracted from the request using the configured key
  3. Language Validation: Each language ID is validated against the languages table (cached)
  4. Slug Generation: If configured, unique slugs are generated from the specified field
  5. Locale Storage: If enabled, language codes are automatically stored
  6. Cascade Delete: When a model is deleted, all translations are removed

Performance

Example Application

Check the /example directory for a complete working Laravel application with:

Requirements

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository at https://github.com/EbrahimHanna580/translation-manager
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Please ensure:

Security

If you discover any security-related issues, please report them by emailing [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

Support


All versions of laravel-translations with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package wecansync/laravel-translations contains the following files

Loading the files please wait ...