2017 © Pedro Peláez
 

library skeleton-i18n

Translation and internationalization for Skeleton

image

tigron/skeleton-i18n

Translation and internationalization for Skeleton

  • Monday, July 16, 2018
  • by tigron
  • Repository
  • 2 Watchers
  • 0 Stars
  • 4,182 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 19 Versions
  • 9 % Grown

The README.md

skeleton-i18n

Description

This library enables internationalization and translation features in Skeleton., (*1)

Installation

Installation via composer:, (*2)

composer require tigron/skeleton-i18n

Run the migrations to update the database schema:, (*3)

skeleton migrate:up

Howto

Configure the package:, (*4)

/**
 * The path to store the po files
 *
 * \Skeleton\I18n\Config::$po_directory is deprecated
 */
\Skeleton\I18n\Config::$po_path = '/my_app/po';

/**
 * Define a temporary folder to cache all translations
 *
 * \Skeleton\I18n\Config::$cache_directory is deprecated
 */
\Skeleton\I18n\Config::$cache_path = '/my_app/tmp/languages';

/**
 * Optional:
 * skeleton-i18n keeps translations for templates per application.
 * For every skeleton application in your project a different po file is
 * created that contains all strings to be translated for the given
 * application.
 * If for some reason, you want to include more templates, this can
 * be done via the following configuration.
\Skeleton\I18n\Config::$additional_template_paths['pdf'] = '/my_app/pdf/templates';

/**
 * Optional:
 * Set another Language interface
 */
\Skeleton\I18n\Config::$language_interface = '\Language';

/**
 * Optional:
 * Enable auto fill po file when requesting translation
 * Default to false
 */
\Skeleton\I18n\Config::$auto_fill_po = true;

Use it:, (*5)

Via a twig template rendered by skeleton-template-twig:, (*6)

{% trans "To be translated" %}

Directly via PHP:, (*7)

$language = Language::get_by_name_short('en');
$application_name = 'admin';
$translation = \Skeleton\I18n\Translation::get($language, $application_name);
\Skeleton\I18n\Translation::translate('To be translated', $translation);

The Versions

16/07 2018

dev-master

9999999-dev

Translation and internationalization for Skeleton

  Sources   Download

MIT

The Requires

 

The Development Requires

by Tigron BVBA

16/07 2018

v1.0.7

1.0.7.0

Translation and internationalization for Skeleton

  Sources   Download

MIT

The Requires

 

by Tigron BVBA

08/06 2018

v1.0.6

1.0.6.0

Translation and internationalization for Skeleton

  Sources   Download

MIT

The Requires

 

by Tigron BVBA

04/05 2018

v1.0.5

1.0.5.0

Translation and internationalization for Skeleton

  Sources   Download

MIT

The Requires

 

by Tigron BVBA

05/04 2018

v1.0.4

1.0.4.0

Translation and internationalization for Skeleton

  Sources   Download

MIT

The Requires

 

by Tigron BVBA

03/04 2018

v1.0.3

1.0.3.0

Translation and internationalization for Skeleton

  Sources   Download

MIT

The Requires

 

by Tigron BVBA

03/04 2018

v1.0.2

1.0.2.0

Translation and internationalization for Skeleton

  Sources   Download

MIT

The Requires

 

by Tigron BVBA

29/03 2018

v1.0.1

1.0.1.0

Translation and internationalization for Skeleton

  Sources   Download

MIT

The Requires

 

by Tigron BVBA

29/03 2018

v1.0.0

1.0.0.0

Translation and internationalization for Skeleton

  Sources   Download

MIT

The Requires

 

by Tigron BVBA

17/11 2017

v0.0.9

0.0.9.0

Translation and internationalization for Skeleton

  Sources   Download

MIT

The Requires

 

by Tigron BVBA

14/12 2016

v0.0.8

0.0.8.0

Translation and internationalization for Skeleton

  Sources   Download

MIT

The Development Requires

by Tigron BVBA

14/12 2016

v0.0.7

0.0.7.0

Translation and internationalization for Skeleton

  Sources   Download

MIT

The Development Requires

by Tigron BVBA

14/12 2016

v0.0.6

0.0.6.0

Translation and internationalization for Skeleton

  Sources   Download

MIT

The Development Requires

by Tigron BVBA

28/09 2016

v0.0.5

0.0.5.0

Translation and internationalization for Skeleton

  Sources   Download

MIT

The Development Requires

by Tigron BVBA

09/02 2016

v0

0.0.0.0

Translation and internationalization for Skeleton

  Sources   Download

MIT

The Development Requires

by Tigron BVBA

09/02 2016

v0.0.4

0.0.4.0

Translation and internationalization for Skeleton

  Sources   Download

MIT

The Development Requires

by Tigron BVBA

25/01 2016

v0.0.3

0.0.3.0

Translation and internationalization for Skeleton

  Sources   Download

MIT

The Development Requires

by Tigron BVBA

09/11 2015

v0.0.2

0.0.2.0

Translation and internationalization for Skeleton

  Sources   Download

MIT

The Development Requires

by Tigron BVBA

14/08 2015

v0.0.1

0.0.1.0

Translation and internationalization for Skeleton

  Sources   Download

MIT

The Development Requires

by Tigron BVBA