Arr::l10n

Posted on November 16, 2016

Making l10n script data from array.

Example usage

$l10n = Arr::l10n(
    'my_data',
    [
        'lolitaframework' => 'best',
        'genesis'         => 'suscks',
    ]
);
echo $l10n;

// <script type="text/javascript">var my_data = {"lolitaframework":"best","genesis":"suscks"};</script>

Parameters

string $object_name javascript object name.

array $l10n array to convert into l10n script.

Return Value

string l10n string.

0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *