Download the PHP package daandelange/translatedlayout without Composer

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

Kirby TranslatedLayout field plugin

This plugin brings translation logics into the native layouts fields.

Experimental

While the kirby team is waiting for some heavy refactoring for recursively bringing translation logics into their "complex fields", this plugin aims to provide a temporary workaround for multi-language websites.

This is an experimental draft trying to bring some translation logic to blocks, columns and layouts. It turns out to be quite powerful already with just a minimal set of changes compared to the native field behaviour.

Current state :
Tested on a single configuration, works well but not extensively tested. Therefore, please note that there remains a risk of data loss. (Do not use without backups!)
There is no translatedblocks fields nor toTranslatedBlocks method (yet?), please use layouts instead.

Implementation

Requirements

Installation

Choose one:

Setup

Import existing data

Warning! If you already have a layout with translated content, switching to this field will erase all translations unless you manually give the same id to blocks/rows/columns in the translations data structure. There is no automatic script available.
The same happens when you change the default language so make sure it's correct, and to never change it again.

Blueprints

In your page blueprints, you can simply replace a type: layout field by type: translatedlayout. Read more about how to use the respective fields in the official Kirby docs.

The only difference is an extra translate property on fields, please refer to this example:

`

To use predefined translation settings for the default kirby blocks, you may use :

` This can be useful for quickly setting up this plugin in a test environment.
Beware that this will add the fields to your fieldsets if they don't exist yet.

To setup your own fieldsets, prefer copy/pasting from translatedlayoutwithfieldsets.yml and adapt it to your needs.

Templates

Use $field->toTranslatedLayout() in your templates to fetch & render the field contents. Like the native LayoutField's toLayouts, a Kirby\Cms\Layouts object is returned. There is absolutely no difference as the plugin acts during the data parse state.

Options

There are no options available yet. Would you like to contribute some ?

Development

Feature ideas

Similar Plugins

License

MIT - Free to use, free to improve !

However, for usage in commercial projects, please seriously consider to improve the plugin a little and contribute back the changes with a PR, or hire someone to do so.
For contribution suggestions, you can search for todo in the source code or refer to open issues.

Credits


All versions of translatedlayout with dependencies

PHP Build Version
Package Version
Requires getkirby/composer-installer Version ^1.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 daandelange/translatedlayout contains the following files

Loading the files please wait ...