PHP code example of novembit / i18n
1. Go to this page and download the library: Download novembit/i18n library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
novembit / i18n example snippets
Arrays::arrayWalkWithRoute( array &$arr, callable $callback, \NovemBit\i18n\system\helpers\Strings $route = '', \NovemBit\i18n\system\helpers\Strings $separator = '>' ): void
Arrays::arrayMergeRecursiveDistinct( array &$array1, array &$array2 ): array
DataMapper::getDB( ): \Doctrine\DBAL\Connection
DB::__construct( array $config = array(), null|\NovemBit\i18n\system\Component &$context = null )
DB::commonInit( ): void
DB::isCli( ): boolean
DB::getLogger( ): \Psr\Log\LoggerInterface
DB::setLogger( \Psr\Log\LoggerInterface $logger )
DB::getRuntimeDir( ): string
DB::setRuntimeDir( string $runtime_dir )
DB::setCachePool( \Psr\SimpleCache\CacheInterface $cache_pool )
DB::getCachePool( ): \Psr\SimpleCache\CacheInterface
DB::defaultConfig( )
DB::getConnection( ): \yii\db\Connection
DB::setConnection( \yii\db\Connection $_connection ): void
DB::__construct( array $config = array(), null|\NovemBit\i18n\system\Component &$context = null )
DB::commonInit( ): void
DB::isCli( ): boolean
DB::getLogger( ): \Psr\Log\LoggerInterface
DB::setLogger( \Psr\Log\LoggerInterface $logger )
DB::getRuntimeDir( ): string
DB::setRuntimeDir( string $runtime_dir )
DB::setCachePool( \Psr\SimpleCache\CacheInterface $cache_pool )
DB::getCachePool( ): \Psr\SimpleCache\CacheInterface
DB::defaultConfig( )
DB::getConnection( ): \Doctrine\DBAL\Connection
DB::getConnectionParams( ): array
Google::mainInit( ): void
HTML::get( array $texts, string $from_language, array $to_languages, boolean $reverse = false ): array
HTML::saveTranslations( string $from_language, array $translations, integer $level, boolean $overwrite = false, array &$result = array() ): void
HTML::getDB( ): \Doctrine\DBAL\Connection
HTML::defaultConfig( ): array
HTML::getParserType( ): integer
HTML::setParserType( integer $parser_type )
HTML::buildToTranslateFields( \DOMNode &$node, array $params, array &$data )
HTML::replaceTranslatedFields( \DOMNode &$node, array $params, array &$data )
HTML::getHelperAttributes( ): boolean
HTML::setHelperAttributes( boolean $status ): void
HTML::addBeforeParseCallback( callable $callback )
HTML::addAfterParseCallback( callable $callback )
HTML::getBeforeParseCallbacks( ): array
HTML::getAfterParseCallbacks( ): array
HTMLFragment::defaultConfig( ): array
HTMLFragment::getParserType( ): integer
HTMLFragment::setParserType( integer $parser_type )
HTMLFragment::buildToTranslateFields( \DOMNode &$node, array $params, array &$data )
HTMLFragment::replaceTranslatedFields( \DOMNode &$node, array $params, array &$data )
HTMLFragment::getHelperAttributes( ): boolean
HTMLFragment::setHelperAttributes( boolean $status ): void
HTMLFragment::addBeforeParseCallback( callable $callback )
HTMLFragment::addAfterParseCallback( callable $callback )
HTMLFragment::getBeforeParseCallbacks( ): array
HTMLFragment::getAfterParseCallbacks( ): array
JSON::get( array $texts, string $from_language, array $to_languages, boolean $reverse = false ): array
JSON::saveTranslations( string $from_language, array $translations, integer $level, boolean $overwrite = false, array &$result = array() ): void
JSON::getDB( ): \Doctrine\DBAL\Connection
Method::get( array $texts, string $from_language, array $to_languages, boolean $reverse = false ): array
Method::saveTranslations( string $from_language, array $translations, integer $level, boolean $overwrite = false, array &$result = array() ): void
Method::getDB( ): \Doctrine\DBAL\Connection
Module::__construct( array $config = array(), null|\NovemBit\i18n\system\Component &$context = null )
Module::commonLateInit( ): void
Module::mainInit( ): void
Module::isCli( ): boolean
Module::getLogger( ): \Psr\Log\LoggerInterface
Module::setLogger( \Psr\Log\LoggerInterface $logger )
Module::getRuntimeDir( ): string
Module::setRuntimeDir( string $runtime_dir )
Module::setCachePool( \Psr\SimpleCache\CacheInterface $cache_pool )
Module::getCachePool( ): \Psr\SimpleCache\CacheInterface
Module::defaultConfig( ): array
Module::start( ): void
Module::instance( null|array $config = null ): self
Rest::__construct( array $config = array(), null|\NovemBit\i18n\system\Component &$context = null )
Rest::isCli( ): boolean
Rest::getLogger( ): \Psr\Log\LoggerInterface
Rest::setLogger( \Psr\Log\LoggerInterface $logger )
Rest::getRuntimeDir( ): string
Rest::setRuntimeDir( string $runtime_dir )
Rest::setCachePool( \Psr\SimpleCache\CacheInterface $cache_pool )
Rest::getCachePool( ): \Psr\SimpleCache\CacheInterface
Rest::defaultConfig( )
Rest::start( ): void
Rest::actionTranslate( ): array|integer
Rest::actionIndex( ): array
Rest::actionRestrict( ): array
Rest::getLanguagesConfig( ): array
Strings::getStringsDifference( string $before, string $after, string|null &$prefix = null, string|null &$suffix = null ): void
Text::get( array $texts, string $from_language, array $to_languages, boolean $reverse = false ): array
Text::saveTranslations( string $from_language, array $translations, integer $level, boolean $overwrite = false, array &$result = array() ): void
Text::getDB( ): \Doctrine\DBAL\Connection
Translation::getDB( ): \Doctrine\DBAL\Connection
Translation::get( array $texts, string $from_language, array $to_languages, boolean $reverse = false ): array
Translation::saveTranslations( string $from_language, array $translations, integer $level, boolean $overwrite = false, array &$result = array() ): void
URL::get( array $texts, string $from_language, array $to_languages, boolean $reverse = false ): array
URL::saveTranslations( string $from_language, array $translations, integer $level, boolean $overwrite = false, array &$result = array() ): void
URL::getDB( ): \Doctrine\DBAL\Connection
URL::rules( ): array
URL::addQueryVars( string $url, string $name, string $value ): string
URL::removeQueryVars( string $url, string $paramName ): string
URL::buildUrl( array $parts ): string
php
XML::defaultConfig( ): array
php
XML::setParserType( integer $parser_type )
php
XML::buildToTranslateFields( \DOMNode &$node, array $params, array &$data )
php
XML::replaceTranslatedFields( \DOMNode &$node, array $params, array &$data )
php
XML::addBeforeParseCallback( callable $callback )
php
XML::addAfterParseCallback( callable $callback )
php
XML::getBeforeParseCallbacks( ): array
php
XML::getAfterParseCallbacks( ): array
php
XML::get( array $texts, string $from_language, array $to_languages, boolean $reverse = false ): array
php
XML::saveTranslations( string $from_language, array $translations, integer $level, boolean $overwrite = false, array &$result = array() ): void
php
XML::getDB( ): \Doctrine\DBAL\Connection