happyr/auto-fallback-translation-bundle

This package is abandoned and no longer maintained. The author suggests using the php-translation/symfony-bundle package instead.

Make sure to use a translation service like Bing or Google to translate your missing messages

Maintainers

👁 Nyholm

Package info

github.com/Happyr/AutoFallbackTranslationBundle

Homepage

Type:symfony-bundle

pkg:composer/happyr/auto-fallback-translation-bundle

Statistics

Installs: 98

Dependents: 0

Suggesters: 1

Stars: 2

Open Issues: 0

1.0.1 2016-11-12 20:13 UTC

Requires

Suggests

Provides

None

Conflicts

None

Replaces

None

MIT f365e4b1b7baaa916f3e1418a7318162509ddf43

  • Tobias Nyholm <tobias.nyholm.woop@gmail.com>

This package is auto-updated.

Last update: 2022-02-01 12:53:51 UTC


README

👁 Latest Version
👁 Build Status
👁 Code Coverage
👁 Quality Score
👁 Total Downloads

DEPRECATED: Use php-translation/symfony-bundle

This bundle uses Google to translate messages that you have not translated yet. So instead of using a fallback language you get a Google translated string. Sure, Google translate is not optimal but it is way better then using a different language. With this feature you can deploy a new version even before your translators have done their work.

To Install

Run the following in your project root, assuming you have composer set up for your project

composer require happyr/auto-fallback-translation-bundle

Add the bundle to app/AppKernel.php

class AppKernel extends Kernel
{
 public function registerBundles()
 {
 $bundles = array(
 // ...
 new Happyr\AutoFallbackTranslationBundle\HappyrAutoFallbackTranslationBundle(),
 }
 }
}

Configuration

// app/config/config.yml
happyr_auto_fallback_translation:
 enabled: false
 default_locale: en
 translation_service: "google"
 google_key: "%google_server_api_key%"
 http_client: httplug.client.auto_translation
 message_factory: httplug.message_factory # default
 
 // app/config/config_prod.yml
happyr_auto_fallback_translation:
 enabled: true # Only enabled in production

To easier configure the HTTP client and message factory, have a look at HttplugBundle.