Download the PHP package opgginc/codezero-laravel-uri-translator without Composer

On this page you can find all versions of the php package opgginc/codezero-laravel-uri-translator. 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 codezero-laravel-uri-translator

Laravel URI Translator

Laravel Total Downloads

ko-fi

This package registers a macro for the Laravel Translator class. This will allow you to translate individual URI slugs, while ignoring parameter placeholders.

Parameters will not be translated by this macro. That remains the responsibility of your code.

✅ Requirements

📦 Install

Install this package with Composer:

Laravel will automatically register the ServiceProvider.

In your app's lang folder, create subdirectories for every locale you want to have translations for.

Next create a routes.php file in each of those directories.

Return an array of translations from the routes.php files.

🚀 Usage

Use the Lang::uri() macro when registering routes:

The URI macro accepts 2 additional parameters:

  1. A locale, in case you need translations to a locale other than the current app locale.
  2. A namespace, in case your translation files reside in a package.

You can also use trans()->uri('hello/world') instead of Lang::uri('hello/world').

🔌 Example

Using these example translations:

These are possible translation results:

🚧 Testing

☕️ Credits

This package is a fork of the original work by Ivan Vermeyen. We are deeply saddened to share that Ivan has passed away. In memory of his excellent contribution to the Laravel community, we have forked this package to maintain and extend its functionality for newer Laravel versions. We extend our condolences to Ivan's family and friends.

🔒 Security

This project is maintained by OP.GG Inc. If you discover any security related issues, please use the issue tracker.

📑 Changelog

This package is a fork of codezero/laravel-uri-translator, updated to support Laravel 12 and PHP 8.4.

📜 License

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


All versions of codezero-laravel-uri-translator with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1|^8.2|^8.3|^8.4
illuminate/support Version ^10.0|^11.0|^12.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 opgginc/codezero-laravel-uri-translator contains the following files

Loading the files please wait ....