Download the PHP package labor-digital/typo3-translation-utils without Composer

On this page you can find all versions of the php package labor-digital/typo3-translation-utils. 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 typo3-translation-utils

TYPO3 - Translation Utils

A simple development helper package which provides some command line utilities to work with translation files.

A word of caution: This is a development helper and should not be installed on a production machine!

Requirements

Installation

Install this package using composer:

After that, you can activate the extension in the Extensions-Manager of your TYPO3 installation

Documentation

t3tu:export

Exports the translation labels of an extension into a csv file. A csv file will be created for every base translation file in your extension. Meaning locallang.xlf will be exported into locallang.csv, while locallang_be.xlf will be exported into locallang_be.csv.

The script will load all translations in your directory, that are named de.locallang.xlf, es.locallang.xlf,... and put the labels into their own column of the file.

With this you can easily provide your Translators an overview of all translations and their matching key.

Option: --format | -f

Allows you to change the output format of the translations. By default a .csv file is exported. With this option you can also set it to .xls, .xlsx or .ods, depending on your needs

t3tu:import

Imports the csv files of a translation into xlf translation files. This is basically the reverse operation to "export". After you changed the content in your csv files in your translation directory. This command will read all the csv files and update/create the required translation xlf files.

NOTE If the script finds .xls, .xlsx or .ods files in your language directory, it will parse them in the same way it does .csv files. This is helpful if you have issues with UTF-8 encoded chars in your excel file

t3tu:sync

Synchronizes all translation files (e.g. de.locallang.xlf,...) with your origin file (e.g. locallang.xlf) and vice versa.

The sync uses the origin file, as "source of truth", meaning all translation keys you add or remove there will be added/removed to the matching translation files. All newly created entries in the translation files are prefixed with COPY FROM - $SOURCELANG: to make them easy to spot.

If you rename a translation key in the origin file, the keys in the translation files will be updated automatically to match. (ONLY if the "source" tag matches both the origin file and the translation file, otherwise the key in the translation file will be recreated!).

The sync will automatically update the "source" tag in your translation files if it was changed in the origin file.

The sync will also make sure that all source files, have the same language variants available to them. This means in practice, if you start with:

After the sync you will get something like this:

You can also introduce a new language variant by adding an empty file for your language. The file gets automatically prepared with a dummy content and added to all existing origin files.

Configuration

You can configure the extension using the "ext config" framework provided by the TYPO3 - Better API extension. To create a config, add a new class under $ext_key/Configuration/ExtConfig/TranslationUtils.php which looks like this:

Configuring other extensions

The configuration is, by default, constrainted to the extension which adds the configuration class. So Our T3baExample namespace above, is only active for the t3ba_example extension. To provide a configuration for other extensions, you can use the "runWithExtKeyAndVendor" simulator provided by the ext config implementation. Using this method, you can provide configuration as if added by another extension. So to configure ext:news you could do this:

Postcardware

You're free to use this package, but if it makes it to your production environment we highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using.

Our address is: LABOR.digital - Fischtorplatz 21 - 55116 Mainz, Germany

We publish all received postcards on our company website.


All versions of typo3-translation-utils with dependencies

PHP Build Version
Package Version
Requires labor-digital/typo3-better-api Version ^10.0
phpoffice/phpspreadsheet Version ^1.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 labor-digital/typo3-translation-utils contains the following files

Loading the files please wait ....