Work on the creation began in
May ,
in July there was a good working version, and now in December we have:
- Full compliance with ISO codes ISO-3166-1 and ISO-3166-2
- Ability to select a dividing system - ISO, FIPS or GeoNames
- Full coverage of countries and regions of the world with Russian translations
- Logical data isolation from the code, open the way the SDK in other languages
- Official site with documentation in Russian
Our goal is very simple - to become a standard open-source library of geographic data (administrative divisions and titles). There is nothing like that today, each developer has to reinvent the wheel.
In short, the main advantage of using the Geographer library is the ability to do something like:
use MenaraSolutions\Geographer\State; $voronezh = State::build('RU-VOR'); echo " {$voronezh->getName('ru')}\n"; echo " {$voronezh->inflict('in')->getName()}\n"; echo " {$voronezh->inflict('from')->getName()}\n";
If you think that this is very simple, then know that even giants like Facebook and VK still make it with errors! :)
')
- In the templates do not need to think about the correct preposition ("in", "in", "on" and so on)
- No need to clutter up the database and code with content secondary to the product.
- The database is constantly being edited by open-source programmers (for free!)
Separating data from code
An important difference between the current version was the separation of repositories - JSON data is now stored as a separate package, which allows the use of content in other programming languages. In addition, corrections, for example, in Russian will be downloaded only by those who really need Russian (the package with the Russian language is installed in composer.json).
Ability to choose a standard
By default, Geographer uses the ISO 3166 system to divide by country and region. ISO is the only actively supported standard for today, so we recommend using it. However, the standard can be chosen:
$country->setStandard(DefaultManager::STANDARD_ISO);
Participation is welcome
We invite developers to participate!
Geographer is a promising and useful package. Among the SDK priorities for Node.js and Ruby, as well as bringing the translation of cities in Russian to 100%.
Comments, criticism and any other feedback are also much appreciated.