Download the PHP package visualbuilder/ai-translate without Composer

On this page you can find all versions of the php package visualbuilder/ai-translate. 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 ai-translate

AI Translator for Laravel locales

Latest Version on Packagist Total Downloads run-tests Check & fix styling

Examples

Examples:- From English:

To Arabic:-

To Ukrainian:-

To German:-

To Spanish:-

To Chinese Simplified:-

To Swedish:-

Requirements

PHP 8.1 Is the minimum for the OpenAI Wrapper.

Tested with Laravel ^9.45 and 10.x

Filament is not required (but can add to their already awesome set of translations.)

Installation

Download the package via composer:

Run the install to copy the config files:-

This will create config/ai-translate.php and config/openai.php if it isn't already installed.

If you don't have GPT keys already visit: https://platform.openai.com/account/api-keys

Add these keys to your .env

Usage

Check the config file to make sure you have included the required source locale directories. Copy from the list of known_locales the languages you wish to translate into the target_locales array.

Currently handles .json and .php translation files. Attribute tokens should remain unchanged. This was a challenge as GPT-3.5 refused to ignore :attribute and always translated it even when told explicity to ignore it. To solve this all tokens are replaced with *** before translation and added back in after translation ensuring continuity.

To run the script:-

The script will scan all the source_directories for translation files and then provide an estimate of the cost to translate into the required languages for each GPT Model.

If you're happy to continue, select the model you wish to use and each source file will be translated.

If the target file exists, only new keys not in the target will be translated. Unless you use the --force option which will overwrite any existing translations.

I will be adding additional capabilities for model translations and for Spatie Language lines. I have these in a couple of projects so want to extend features.

Testing

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

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

Credits

License

The GNU GPLv3. Please see License File for more information.


All versions of ai-translate with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
openai-php/laravel Version *
symfony/var-exporter Version *
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 visualbuilder/ai-translate contains the following files

Loading the files please wait ....