You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
759 B
25 lines
759 B
#!/usr/bin/env php
|
|
<?php
|
|
|
|
use PhpOffice\PhpSpreadsheet\Calculation\Calculation;
|
|
use PhpOffice\PhpSpreadsheetInfra\LocaleGenerator;
|
|
|
|
require_once 'vendor/autoload.php';
|
|
|
|
try {
|
|
$phpSpreadsheetFunctionsProperty = (new ReflectionClass(Calculation::class))
|
|
->getProperty('phpSpreadsheetFunctions');
|
|
$phpSpreadsheetFunctionsProperty->setAccessible(true);
|
|
$phpSpreadsheetFunctions = $phpSpreadsheetFunctionsProperty->getValue();
|
|
|
|
$localeGenerator = new LocaleGenerator(
|
|
realpath(__DIR__ . '/../src/PhpSpreadsheet/Calculation/locale/'),
|
|
'Translations.xlsx',
|
|
$phpSpreadsheetFunctions,
|
|
true
|
|
);
|
|
$localeGenerator->generateLocales();
|
|
} catch (\Exception $e) {
|
|
fwrite(STDERR, (string) $e);
|
|
exit(1);
|
|
}
|
|
|