Download the PHP package rougin/transcribe without Composer

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

Transcribe

Latest Version on Packagist Software License Build Status Coverage Status Total Downloads

Transcribe is a simple localization package written in PHP in which the translated word can be retrieved easily based on the specified locale. A localization source can be from multiple .php files or from a database connection using PDO.

Installation

Install the Transcribe package via Composer:

Basic usage

Prior in using Transcribe, a list of words must be provided with its specified translations (e.g., fil_PH.php):

Once provided, specify the words in a source (e.g., FileSource):

After creating the specified source, use the get method from the Locale class to get the localized word based on its keyword:

Using the setDefault method can define the default locale. With this, there is no need to specify it when using the get method:

Using sources

The previous example uses the FileSource which uses .php files in getting localized words. But Transcribe also provides a way in getting the said localized words through a database using the PdoSource:

When using the PdoSource class, it can also specify the database table and its columns to be used for getting the localized words:

[!NOTE] If the required table and columns were not specified, its default values are the same from the above-example (e.g., locales for table, and type, name, and text values for the columns).

Then use the same get method from Locale class to get the localized word from the database table:

Creating custom sources

To create a custom source, kindly use the SourceInterface for its implementation:

The words method should return a list of words in an associative array format:

The specified method will be used as the reference for finding the localized word from the get method of Locale class.

Migrating to the v0.4.0 release

The new release for v0.4.0 will be having a backward compatibility break (BC break). With this, some functionalities from the earlier versions might not be working after upgrading. This was done to increase extensibility, simplicity and maintainbility. This was discussed in one of my blog post which also mentions Transcribe:

I also want to extend this plan to my personal packages as well like Staticka and Transcribe. With this, I will introduce backward compatibility breaks to them initially as it is hard to migrate their codebase due to minimal to no documentation being provided in its basic usage and its internals. As I checked their code, I realized that they are also over engineered, which is a mistake that I needed to atone for when updating my packages in the future.

Please see Pull Request #1 for the files that were removed or updated in this release and the UPGRADING page for the specified breaking changes.

Changelog

Please see CHANGELOG for more information what has changed recently.

Testing

Credits

License

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


All versions of transcribe with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
tebru/multi-array Version ~0.2
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 rougin/transcribe contains the following files

Loading the files please wait ....