From fb83cbf9ed6a929c66660f4ae8fe341c8a5ea57f Mon Sep 17 00:00:00 2001 From: Dmytro Sokil Date: Thu, 29 Nov 2018 20:57:30 +0200 Subject: [PATCH] manual database update --- README.md | 45 ++++++++++++++++++++++++++++++++++----------- 1 file changed, 34 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index abab1370..ead0e288 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,8 @@ Current translation status: https://salsa.debian.org/iso-codes-team/iso-codes#st * [ISO Standards](#iso-standarts) * [Installation](#installation) +* [Locale configuration](#locale-configuration) +* [Manual database update](#manual-database-update) * [Usage](#usage) * [Locale configuration](#locale-configuration) * [Countries database (ISO 3166-1)](#countries-database-iso-3166-1) @@ -43,17 +45,7 @@ You can install library through Composer: composer require sokil/php-isocodes ``` -## Usage - -* [Locale configuration](#locale-configuration) -* [Countries database (ISO 3166-1)](#countries-database-iso-3166-1) -* [Subdivisions database (ISO 3166-2)](#subdivisions-database-iso-3166-2) -* [Historic countries database (ISO 3166-3)](#historic-countries-database-iso-3166-3) -* [Scripts database (ISO 15924)](#scripts-database-iso-15924) -* [Currencies database (ISO 4217)](#currencies-database-iso-4217) -* [Languages database (ISO 639-3)](#languages-database-iso-639-3) - -### Locale configuration +## Locale configuration Before using IsoCodes database you need to setup valid locale to get transtions worked: @@ -95,6 +87,37 @@ Generating locales... Generation complete. ``` +## Manual database update + +Database and related gettext files located inside this repo in `databases` and `messages` directories. +This data periodically updated with package version increment. + +If you want to update database more often, use script `update_db.sh`. +Call this script by cron, during deploy process or when build your docker image. + +``` +/path/to/project/vendor/sokil/php-isocodes/update_db.sh /var/isododes +``` + +Now you need to configure factory to use this directory: + +```php +