Download the PHP package novembit/i18n without Composer

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

NovemBit i18n - Internationalization framework library

Table of Contents

Arrays

arrayWalkWithRoute

Recursive array walk with callback and route

Parameter Type Description
$arr array Main array
$callback callable Callback function with 3 params (key/val/route)
$route \NovemBit\i18n\system\helpers\Strings Parent route
$separator \NovemBit\i18n\system\helpers\Strings Route separator

arrayMergeRecursiveDistinct

array_merge_recursive does indeed merge arrays, but it converts values with duplicate keys to arrays rather than overwriting the value in the first array with the duplicate value in the second array, as array_merge does. I.e., with array_merge_recursive, this happens (documented behavior):

array_merge_recursive(array('key' => 'org value'), array('key' => 'new value')); => array('key' => array('org value', 'new value'));

array_merge_recursive_distinct does not change the datatypes of the values in the arrays. Matching keys' values in the second array overwrite those in the first array, as is the case with array_merge, i.e.:

array_merge_recursive_distinct(array('key' => 'org value'), array('key' => 'new value')); => array('key' => array('new value'));

Parameters are passed by reference, though only for performance reasons. They're not altered by this function.

Parameter Type Description
$array1 array
$array2 array

DataMapper

ActiveRecord class. Child of Yii ActiveRecord library

See Also:

getDB


DB

DB component

Its simple but provides very useful functionality Module class

See Also:

__construct

Component constructor.

Parameters:

Parameter Type Description
$config array Configuration array
$context null|\NovemBit\i18n\system\Component Context (parent) Component

commonInit

{@inheritdoc} Init method of component.

Setting default connection of DB


isCli

Check if script running on CLI


getLogger


setLogger

Parameters:

Parameter Type Description
$logger \Psr\Log\LoggerInterface

getRuntimeDir


setRuntimeDir

Parameters:

Parameter Type Description
$runtime_dir string

setCachePool

Parameters:

Parameter Type Description
$cache_pool \Psr\SimpleCache\CacheInterface

getCachePool


defaultConfig


getConnection

Get connection of DB


setConnection

Set connection of DB

Parameters:

Parameter Type Description
$_connection \yii\db\Connection Yii2 db connection

DB

DB component

Its simple but provides very useful functionality Module class

See Also:

__construct

Component constructor.

Parameters:

Parameter Type Description
$config array Configuration array
$context null|\NovemBit\i18n\system\Component Context (parent) Component

commonInit

{@inheritdoc} Init method of component.

Setting default connection of DB


isCli

Check if script running on CLI


getLogger


setLogger

Parameters:

Parameter Type Description
$logger \Psr\Log\LoggerInterface

getRuntimeDir


setRuntimeDir

Parameters:

Parameter Type Description
$runtime_dir string

setCachePool

Parameters:

Parameter Type Description
$cache_pool \Psr\SimpleCache\CacheInterface

getCachePool


defaultConfig


getConnection

Get connection of DB


getConnectionParams

Connection params getter


Dummy

Dummy method of translation

See Also:

Exception

System Exception class

See Also:

Google

Google Translate method of translation

See Also:

mainInit

{@inheritdoc}


HTML

ActiveRecord class. Child of Yii ActiveRecord library

See Also:

get

Main method to get translations from DB

Parameter Type Description
$texts array Texts array to translate
$from_language string From language
$to_languages array To languages list
$reverse boolean Use translate column as source (ReTranslate)

saveTranslations

Main method to save translations in DB

Parameter Type Description
$from_language string From language
$translations array Translations of texts
$level integer Level of translation
$overwrite boolean Overwrite or not
$result array

getDB


HTML

HTML type for translation component

See Also:

defaultConfig

{@inheritDoc}


getParserType


setParserType

Parameters:

Parameter Type Description
$parser_type integer

buildToTranslateFields

Parameters:

Parameter Type Description
$node \DOMNode
$params array
$data array

replaceTranslatedFields

Parameters:

Parameter Type Description
$node \DOMNode
$params array
$data array

getHelperAttributes

{@inheritDoc}


setHelperAttributes

{@inheritDoc}

Parameters:

Parameter Type Description
$status boolean If true then
html translation including additional attributes

addBeforeParseCallback

Parameters:

Parameter Type Description
$callback callable

addAfterParseCallback

Parameters:

Parameter Type Description
$callback callable

getBeforeParseCallbacks


getAfterParseCallbacks


HTMLFragment

HTML type for translation component

See Also:

defaultConfig

{@inheritDoc}


getParserType


setParserType

Parameters:

Parameter Type Description
$parser_type integer

buildToTranslateFields

Parameters:

Parameter Type Description
$node \DOMNode
$params array
$data array

replaceTranslatedFields

Parameters:

Parameter Type Description
$node \DOMNode
$params array
$data array

getHelperAttributes

{@inheritDoc}


setHelperAttributes

{@inheritDoc}

Parameters:

Parameter Type Description
$status boolean If true then
html translation including additional attributes

addBeforeParseCallback

Parameters:

Parameter Type Description
$callback callable

addAfterParseCallback

Parameters:

Parameter Type Description
$callback callable

getBeforeParseCallbacks


getAfterParseCallbacks


JSON

ActiveRecord class. Child of Yii ActiveRecord library

See Also:

get

Main method to get translations from DB

Parameter Type Description
$texts array Texts array to translate
$from_language string From language
$to_languages array To languages list
$reverse boolean Use translate column as source (ReTranslate)

saveTranslations

Main method to save translations in DB

Parameter Type Description
$from_language string From language
$translations array Translations of texts
$level integer Level of translation
$overwrite boolean Overwrite or not
$result array

getDB


LanguageException

Language Component Exception file

See Also:

Method

ActiveRecord class. Child of Yii ActiveRecord library

See Also:

get

Main method to get translations from DB

Parameter Type Description
$texts array Texts array to translate
$from_language string From language
$to_languages array To languages list
$reverse boolean Use translate column as source (ReTranslate)

saveTranslations

Main method to save translations in DB

Parameter Type Description
$from_language string From language
$translations array Translations of texts
$level integer Level of translation
$overwrite boolean Overwrite or not
$result array

getDB


MethodException

Language Component Exception file

See Also:

Module

Module class Main instance of i18n library. Should be used for any external connection Provides component system. There have some required components, DBAL (RDMS) configurations, Request handlers, Translation abstraction layer,

Its simple but provides very useful functionality Module class

See Also:

__construct

Component constructor.

Parameters:

Parameter Type Description
$config array Configuration array
$context null|\NovemBit\i18n\system\Component Context (parent) Component

commonLateInit

Load Yii framework container to use some libraries that not Allowed to use standalone


mainInit

Component init method Non CLI Running after child component initialization


isCli

Check if script running on CLI


getLogger


setLogger

Parameters:

Parameter Type Description
$logger \Psr\Log\LoggerInterface

getRuntimeDir


setRuntimeDir

Parameters:

Parameter Type Description
$runtime_dir string

setCachePool

Parameters:

Parameter Type Description
$cache_pool \Psr\SimpleCache\CacheInterface

getCachePool


defaultConfig

Default component configuration


start

Start request translation


instance

Creating module main instance

Parameter Type Description
$config null|array Main configuration array

RequestException

Request Exception class

See Also:

Rest

Rest component

Its simple but provides very useful functionality Module class

See Also:

__construct

Component constructor.

Parameters:

Parameter Type Description
$config array Configuration array
$context null|\NovemBit\i18n\system\Component Context (parent) Component

isCli

Check if script running on CLI


getLogger


setLogger

Parameters:

Parameter Type Description
$logger \Psr\Log\LoggerInterface

getRuntimeDir


setRuntimeDir

Parameters:

Parameter Type Description
$runtime_dir string

setCachePool

Parameters:

Parameter Type Description
$cache_pool \Psr\SimpleCache\CacheInterface

getCachePool


defaultConfig


start

Start rest request


actionTranslate

Translate Action method


actionIndex

Index Action method


actionRestrict

Restrict Action method


Rest

Rest Translate method of translation

See Also:

getLanguagesConfig

Get languages configuration from main module instance $config


Strings

getStringsDifference

Get string difference

Parameter Type Description
$before string Initial type of string
$after string Final type of string
$prefix string|null Referenced variable to receive difference prefix
$suffix string|null Referenced variable to receive difference suffix

Text

ActiveRecord class. Child of Yii ActiveRecord library

See Also:

get

Main method to get translations from DB

Parameter Type Description
$texts array Texts array to translate
$from_language string From language
$to_languages array To languages list
$reverse boolean Use translate column as source (ReTranslate)

saveTranslations

Main method to save translations in DB

Parameter Type Description
$from_language string From language
$translations array Translations of texts
$level integer Level of translation
$overwrite boolean Overwrite or not
$result array

getDB


Translation

ActiveRecord class. Child of Yii ActiveRecord library

See Also:

getDB


get

Main method to get translations from DB

Parameter Type Description
$texts array Texts array to translate
$from_language string From language
$to_languages array To languages list
$reverse boolean Use translate column as source (ReTranslate)

saveTranslations

Main method to save translations in DB

Parameter Type Description
$from_language string From language
$translations array Translations of texts
$level integer Level of translation
$overwrite boolean Overwrite or not
$result array

TranslationException

Request Exception class

See Also:

URL

ActiveRecord class. Child of Yii ActiveRecord library

See Also:

get

Main method to get translations from DB

Parameter Type Description
$texts array Texts array to translate
$from_language string From language
$to_languages array To languages list
$reverse boolean Use translate column as source (ReTranslate)

saveTranslations

Main method to save translations in DB

Parameter Type Description
$from_language string From language
$translations array Translations of texts
$level integer Level of translation
$overwrite boolean Overwrite or not
$result array

getDB


rules

{@inheritdoc}


URL

Helper class for some actions with URLs

See Also:

addQueryVars

Adding query parameters to URL

Parameter Type Description
$url string Initial url
$name string Parameter name (key)
$value string Value of parameter

removeQueryVars

Remove Query parameter from URL

Parameter Type Description
$url string Initial url
$paramName string Parameter name (key)

buildUrl

Build url from parts Same as reversed parse_url

Parameter Type Description
$parts array Parts of url

XML

HTML type for translation component

See Also:

defaultConfig

{@inheritDoc}


getParserType


setParserType

Parameters:

Parameter Type Description
$parser_type integer

buildToTranslateFields

Parameters:

Parameter Type Description
$node \DOMNode
$params array
$data array

replaceTranslatedFields

Parameters:

Parameter Type Description
$node \DOMNode
$params array
$data array

getHelperAttributes

{@inheritDoc}


setHelperAttributes

{@inheritDoc}

Parameters:

Parameter Type Description
$status boolean If true then
html translation including additional attributes

addBeforeParseCallback

Parameters:

Parameter Type Description
$callback callable

addAfterParseCallback

Parameters:

Parameter Type Description
$callback callable

getBeforeParseCallbacks


getAfterParseCallbacks


XML

ActiveRecord class. Child of Yii ActiveRecord library

See Also:

get

Main method to get translations from DB

Parameter Type Description
$texts array Texts array to translate
$from_language string From language
$to_languages array To languages list
$reverse boolean Use translate column as source (ReTranslate)

saveTranslations

Main method to save translations in DB

Parameter Type Description
$from_language string From language
$translations array Translations of texts
$level integer Level of translation
$overwrite boolean Overwrite or not
$result array

getDB



This document was automatically generated from source code comments on 2019-12-03 using phpDocumentor and cvuorinen/phpdoc-markdown-public


All versions of i18n with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
ext-dom Version *
ext-libxml Version *
ext-pdo Version *
ext-json Version *
ext-curl Version *
ext-simplexml Version *
ext-mbstring Version *
psr/cache Version *
psr/log Version *
google/cloud-translate Version *
masterminds/html5 Version ^2.7
cache/cache Version *
monolog/monolog Version *
doctrine/dbal Version *
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 novembit/i18n contains the following files

Loading the files please wait ....