{
$locale = 'en';
- $translations = ElearningTranslate::getLocaleTranslations($locale);
+ $translations = ElearningTranslate::getLocaleTranslations($locale, false);
$res = [];
foreach ($translations as $k => $translation) {
if ($k === 'k' || $k === 'nsis') {
use App\Http\Controllers\Admin\Operations\ContentTranslate\ExcelImportOperation;
use Cubist\Backpack\Facades\App;
use Cubist\Backpack\Magic\Models\Translate;
+use Cubist\Util\Files\Files;
use Cubist\Util\PHP;
use Illuminate\Support\Facades\Cache;
protected static function _getCacheKey()
{
- return 'all_' . static::$_name . '_translations';
+ return 'all_' . Files::hashFileAttributes(__FILE__) . '_' . static::$_name . '_translations';
}
public static function getAllTranslations($force = true)
}
$res = [];
-
foreach ($json as $code => $tr) {
$res[$code] = [];
foreach ($tr as $k => $v) {
+
$res[$code][$k] = ['str' => static::keyToStr($k), 'translation' => $v];
}
}