Download the PHP package wernerkrauss/silverstripe-fluent-export-import without Composer

On this page you can find all versions of the php package wernerkrauss/silverstripe-fluent-export-import. 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 silverstripe-fluent-export-import

Silverstripe Fluent Export / Import

An extension for silvertripe/fluent

Installation

Important notice

I take no warranty for any data loss. Please backup your database before importing translations.

There is only a check if the yml file has the same locale as you plan to import. Using the import funcitonality will overwrite the related content in the database.

Please validate the yml files before importing them. Take care to escape apostrophs.

Import / Export

Export

Run dev/tasks/fluent-export to export all translations as a zip of yml files.

You can also go to the LocaleAdmin and click on the export button.

Now you can translate the content and import it again.

Import

Translations are imported in LocaleAdmin. Hit the import button and select the zip or yml file you want to import.

Configuration

You can configure fields you don't want to export, e.g. SiteTree's URLSegment:

Automatic Translation

You can use the ChatGPT API to translate your content. To do so, you need to set the API key in your .env file:

Next add extension to all classes you want to translate:

The AutoTranslate extension adds a flag IsAutoTranslated to the class and a field LastTranslation to each locale. It's meant to be controlled by an editor, if the translation is correct.

⚠️ Be aware, that some extensions of other modules might add translated config to a class. Then you have to add IsAutoTranslated and LastTranslation to the translated config as well.

Configuring ChatGPT

You can configure the ChatGPT API in your config.yml:

If you need to configure the gpt_command more dynamically, you can use the following code in an Extension to ChatGPTTranslator:

fluent-ai-autotranslate task

When everything is configured properly you can run the task dev/tasks/fluent-ai-autotranslate do_publish=1 to translate all content to the desired locale.

If IsAutoTranslated of LastTranslation is missing in localised fields, the task will throw a RuntimeException.

Notice: the task can only publish translated content, if you use FluentVersionedExtension instead of FluentExtension on the versioned DataObjects.

Parameters:

Todo

File Import/Export

Thanks to

Thanks to Nobrainer and Adiwidjaja Teamworks for sponsoring this module ❤️.

A special thank you to Lekoala for the support with his CMS-Actions and PureModal modules.

Thanks to TractorCow and all contributors for the great fluent module. And thanks to the folks at Silverstripe for their great work.

Need Help?

If you need some help with your Silverstripe project, feel free to contact me ✉️.

See you at next StripeCon 👋


All versions of silverstripe-fluent-export-import with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-zip Version *
silverstripe/framework Version ^5.2
tractorcow/silverstripe-fluent Version ^7
lekoala/silverstripe-pure-modal Version ^1.2.1
lekoala/silverstripe-cms-actions Version ^1.7.5
openai-php/client Version ^0.10
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 wernerkrauss/silverstripe-fluent-export-import contains the following files

Loading the files please wait ....