Feat: Translating States and Countries For Greece
This commit is contained in:
@@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Greek translations for Lunar\Models\Country::name, keyed by the exact
|
||||||
|
* English spelling Lunar's own installer seeds (`lunar:import:address-data`
|
||||||
|
* fetches http://data.lunarphp.io/countries+states.json — see
|
||||||
|
* vendor/lunarphp/core/src/Console/Commands/Import/AddressData.php).
|
||||||
|
* `Country`/`State` have no i18n support of their own (plain string
|
||||||
|
* columns, no translatable trait) — this is a plain Laravel lang file, not
|
||||||
|
* Modules\Core\Localization's DB-backed TranslationService, since these
|
||||||
|
* names are fixed reference data seeded once, not editable UI copy (see
|
||||||
|
* docs/localization.md). A consuming app's storefront looks this up
|
||||||
|
* itself, e.g. __('core::countries.'.$country->name) — core has no
|
||||||
|
* storefront UI of its own to wire this into (see docs/lunar.md).
|
||||||
|
*
|
||||||
|
* Only Greece is covered — this store operates within Greece; add further
|
||||||
|
* countries here as needed.
|
||||||
|
*/
|
||||||
|
return [
|
||||||
|
'Greece' => 'Ελλάδα',
|
||||||
|
];
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Greek translations for Lunar\Models\State::name, keyed by the exact
|
||||||
|
* English spelling Lunar's own installer seeds for Greece
|
||||||
|
* (`lunar:import:address-data` — see lang/el/countries.php's own docblock
|
||||||
|
* for the full explanation of why this is a plain lang file, not
|
||||||
|
* Modules\Core\Localization's TranslationService).
|
||||||
|
*
|
||||||
|
* Covers every Greek state/regional-unit row in Lunar's seed dataset —
|
||||||
|
* scoped to Greece only, matching this store's operating country.
|
||||||
|
*/
|
||||||
|
return [
|
||||||
|
'Achaea Regional Unit' => 'Περιφερειακή Ενότητα Αχαΐας',
|
||||||
|
'Aetolia-Acarnania Regional Unit' => 'Περιφερειακή Ενότητα Αιτωλοακαρνανίας',
|
||||||
|
'Arcadia Prefecture' => 'Νομός Αρκαδίας',
|
||||||
|
'Argolis Regional Unit' => 'Περιφερειακή Ενότητα Αργολίδας',
|
||||||
|
'Attica Region' => 'Περιφέρεια Αττικής',
|
||||||
|
'Boeotia Regional Unit' => 'Περιφερειακή Ενότητα Βοιωτίας',
|
||||||
|
'Central Greece Region' => 'Περιφέρεια Στερεάς Ελλάδας',
|
||||||
|
'Central Macedonia' => 'Κεντρική Μακεδονία',
|
||||||
|
'Chania Regional Unit' => 'Περιφερειακή Ενότητα Χανίων',
|
||||||
|
'Corfu Prefecture' => 'Νομός Κέρκυρας',
|
||||||
|
'Corinthia Regional Unit' => 'Περιφερειακή Ενότητα Κορινθίας',
|
||||||
|
'Crete Region' => 'Περιφέρεια Κρήτης',
|
||||||
|
'Drama Regional Unit' => 'Περιφερειακή Ενότητα Δράμας',
|
||||||
|
'East Attica Regional Unit' => 'Περιφερειακή Ενότητα Ανατολικής Αττικής',
|
||||||
|
'East Macedonia and Thrace' => 'Ανατολική Μακεδονία και Θράκη',
|
||||||
|
'Epirus Region' => 'Περιφέρεια Ηπείρου',
|
||||||
|
'Euboea' => 'Εύβοια',
|
||||||
|
'Grevena Prefecture' => 'Νομός Γρεβενών',
|
||||||
|
'Imathia Regional Unit' => 'Περιφερειακή Ενότητα Ημαθίας',
|
||||||
|
'Ioannina Regional Unit' => 'Περιφερειακή Ενότητα Ιωαννίνων',
|
||||||
|
'Ionian Islands Region' => 'Περιφέρεια Ιονίων Νήσων',
|
||||||
|
'Karditsa Regional Unit' => 'Περιφερειακή Ενότητα Καρδίτσας',
|
||||||
|
'Kastoria Regional Unit' => 'Περιφερειακή Ενότητα Καστοριάς',
|
||||||
|
'Kefalonia Prefecture' => 'Νομός Κεφαλληνίας',
|
||||||
|
'Kilkis Regional Unit' => 'Περιφερειακή Ενότητα Κιλκίς',
|
||||||
|
'Kozani Prefecture' => 'Νομός Κοζάνης',
|
||||||
|
'Laconia' => 'Λακωνία',
|
||||||
|
'Larissa Prefecture' => 'Νομός Λάρισας',
|
||||||
|
'Lefkada Regional Unit' => 'Περιφερειακή Ενότητα Λευκάδας',
|
||||||
|
'Pella Regional Unit' => 'Περιφερειακή Ενότητα Πέλλας',
|
||||||
|
'Peloponnese Region' => 'Περιφέρεια Πελοποννήσου',
|
||||||
|
'Phthiotis Prefecture' => 'Νομός Φθιώτιδας',
|
||||||
|
'Preveza Prefecture' => 'Νομός Πρέβεζας',
|
||||||
|
'Serres Prefecture' => 'Νομός Σερρών',
|
||||||
|
'South Aegean' => 'Νότιο Αιγαίο',
|
||||||
|
'Thessaloniki Regional Unit' => 'Περιφερειακή Ενότητα Θεσσαλονίκης',
|
||||||
|
'West Greece Region' => 'Περιφέρεια Δυτικής Ελλάδας',
|
||||||
|
'West Macedonia Region' => 'Περιφέρεια Δυτικής Μακεδονίας',
|
||||||
|
];
|
||||||
@@ -25,6 +25,7 @@ class CoreServiceProvider extends ServiceProvider
|
|||||||
$this->loadViewsFrom(__DIR__ . '/../../resources/views', 'core');
|
$this->loadViewsFrom(__DIR__ . '/../../resources/views', 'core');
|
||||||
Blade::anonymousComponentPath(__DIR__ . '/../../resources/views', 'core');
|
Blade::anonymousComponentPath(__DIR__ . '/../../resources/views', 'core');
|
||||||
$this->loadMigrationsFrom(__DIR__ . '/../../database/migrations');
|
$this->loadMigrationsFrom(__DIR__ . '/../../database/migrations');
|
||||||
|
$this->loadTranslationsFrom(__DIR__ . '/../../lang', 'core');
|
||||||
|
|
||||||
$this->publishes([
|
$this->publishes([
|
||||||
__DIR__ . '/../../config/core.php' => config_path('core.php'),
|
__DIR__ . '/../../config/core.php' => config_path('core.php'),
|
||||||
|
|||||||
Reference in New Issue
Block a user