mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-03 14:37:02 +03:00
Added: support www.transifex.com
New format for translation files (yml) https://www.transifex.com/rainloop/rainloop-webmail/
This commit is contained in:
parent
acaeb82397
commit
5dcceaaca5
161 changed files with 24343 additions and 23386 deletions
|
|
@ -389,7 +389,29 @@ class Utils
|
|||
{
|
||||
if (\file_exists($sFileName))
|
||||
{
|
||||
$aLang = \RainLoop\Utils::CustomParseIniFile($sFileName, true);
|
||||
$isYml = '.yml' === substr($sFileName, -4);
|
||||
if ($isYml)
|
||||
{
|
||||
$aLang = \spyc_load(\str_replace(array(': >-', ': |-'), array(': >', ': |'), \file_get_contents($sFileName)));
|
||||
if (\is_array($aLang))
|
||||
{
|
||||
\reset($aLang);
|
||||
$sLangKey = key($aLang);
|
||||
if (isset($aLang[$sLangKey]) && is_array($aLang[$sLangKey]))
|
||||
{
|
||||
$aLang = $aLang[$sLangKey];
|
||||
}
|
||||
else
|
||||
{
|
||||
$aLang = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$aLang = \RainLoop\Utils::CustomParseIniFile($sFileName, true);
|
||||
}
|
||||
|
||||
if (\is_array($aLang))
|
||||
{
|
||||
foreach ($aLang as $sKey => $mValue)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue