tkriek/google_categories

Sort categories for different locales based on category_id and build relations with parent_id

v1.0.1 2018-04-03 16:03 UTC

This package is auto-updated.

Last update: 2024-12-13 14:20:46 UTC


README

Sorting google categories with parent_id

This was meant to set up a relation between categories so they can easily be added to a database.

WIP for japanese and chinese locale because of their language constructs

iso.php file contains enabled locales to retrieve a google taxonomy file from and parse it.

Example of how to use the sorter OOP style

<?php
   
require __DIR__ . '/src/Sorter.php';
   
$json = (new \TomKriek\GoogleCategories\Sorter([], true))->sort()->sortByParent()->outputJSON(true);