tethys/app/Helpers/utils.php

14 lines
438 B
PHP
Raw Permalink Normal View History

2018-11-21 12:40:34 +00:00
<?php
/**
* Get an associative array with localeCodes as keys and translated URLs of current page as value
*/
function getLocalizedURLArray()
{
$localesOrdered = LaravelLocalization::getLocalesOrder();
$localizedURLs = array();
foreach ($localesOrdered as $localeCode => $properties) {
$localizedURLs[$localeCode] = LaravelLocalization::getLocalizedURL($localeCode, null, [], true);
}
return $localizedURLs;
}