Download the PHP package mikehaertl/translatable without Composer

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

Translatable

Transparent attribute translation for ActiveRecords.

Features:

Here's a basic example:

Installation

Simply extract the package to your protected/extensions directory and rename it to translatable.

How to use

1. Move translateable columns into a separate table

The behavior requires that you move all columns that you want to translate from the original table into a dedicated translation table. So if you have a table books and want to translate title and abstract, you need to modify yourd DB schema a little:

2. Attach the behavior to your ActiveRecord model

With the above DB setup you can now attach the behavior to the Books ActiveRecord.

3. Define a relation from your main record to your translation record

You also have to create a record for the translation table (e.g. BookTranslations) and define a HAS_MANY relationship for it in the Books model.

4. Create validation rules in your main record

You will also want to create some rules for these attributes in the Books record.

Advanced examples

Use a fallback language

TODO

Use fallback columns

TODO

Tabular edit of several languages

TODO

API

Properties

Methods

NOTE: The fallbackLanguage can not be set in the behavior configuration. It's meant to be set on loaded models only.

About

The development of this extension was kindly sponsored by herzog kommunikation GmbH, Stuttgart, Germany.

Changelog

1.0.1

1.0.0


All versions of translatable with dependencies

PHP Build Version
Package Version
Requires php Version >=5.0.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 mikehaertl/translatable contains the following files

Loading the files please wait ....