Download the PHP package weglot/translate-bundle without Composer

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

Symfony Translate Bundle

WeglotSlack Latest Stable Version Maintainability License

Overview

Seamless integration of Weglot into your Symfony project.

Requirements

Installation

You can install the library via Composer. Run the following command:

When you require the bundle with symfony/flex (available for symfony/symfony:^4.0) it should ask you if you wanna execute a recipe, tell yes. Like that it will make bundle registration in config/bundles.php & default config creation in config/packages/weglot_translate.yaml.

To use the library, use Composer's autoload:

Getting Started

Bundle Register

Symfony 4

Add Weglot bundle in the config/bundles.php:

Symfony 3 & 2

Add Weglot bundle to app/AppKernel.php file:

Quick configuration

For Symfony 4, create configuration file under config/packages/weglot_translate.yaml and add following content. For Symfony 3 & 2, add following content to your app/config/config.yaml.

This is the default configuration file, if you want more default, check next part.

Configuration

As already said, depending on Symfony version, we've different configuration file paths:

There is a full configuration file:

This is an example of configuration, enter your own API key, your original language and destination languages that you want.

There is also a non-required parameters:

Twig extensions

Hreflang links

Hreflang links are a way to describe your website and to tell webcrawlers (such as search engines) if this page is available in other languages. More details on Google post about hreflang: https://support.google.com/webmasters/answer/189077

You can add them through the Twig function: weglot_hreflang_render

Just put the function at the end of your <head> tag:

Language button

You can add a language button if you're using Twig with function: weglot_translate_render

Two layouts exists:

Language code

Simple filter to convert ISO 639-1 code to full language name. It can takes one boolean parameter that allow you to choose having english name or original language name.

Here is some examples:

Caching

We implemented usage of cache pool service for both Symfony 4 and Symfony 3 (symfony/cache bundle was released with Symfony 3, so there is no compatibility for Symfony 2).

If you wanna use cache, just add cache: true to this bundle configuration. It will use a file-based cache through Symfony cache.system service.

To clear the cache, you just have to use the usual pool clear command:

Examples

You'll find a short README with details about example on each repository

About

translate-bundle is guided and supported by the Weglot Developer Team.

translate-bundle is maintained and funded by Weglot SAS. The names and logos for translate-bundle are trademarks of Weglot SAS.

License

The MIT License (MIT)


All versions of translate-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5
ext-mbstring Version *
weglot/weglot-php Version ^0.6
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 weglot/translate-bundle contains the following files

Loading the files please wait ....