PHP code example of kosmosafive / bitrix-localization

1. Go to this page and download the library: Download kosmosafive/bitrix-localization 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/ */

    

kosmosafive / bitrix-localization example snippets


return [
    'default_language' => [
        'value' => 'ru',
    ],
];

public static function getMessage(
    string $code,
    ?array $replace = null,
    ?string $language = null,
    ?string $defaultLanguage = null
): ?string

public static function getMessagePlural(
    string $code,
    int $value,
    ?array $replace = null,
    ?string $language = null,
    ?string $defaultLanguage = null
): ?string