-
Notifications
You must be signed in to change notification settings - Fork 2
Home
Welcome to the imdbGraphQLPHP wiki!
About localization that recently been added.
First of all a big thanks to @paxter for his help to make this possible!
Localization is available for TitleSearch, TitleSearchAdvanced, Title and Person class but is disabled by default.
- fr-CA (French Canada)
- fr-FR (French France)
- de-DE (German Germany)
- hi-IN (Hindi Indonesia)
- it-IT (Italian Italy)
- pt-BR (Portuguese Brazil)
- es-ES (Spanish Spain)
- es-MX (Spanish Mexico)
- CA (Canada)
- FR (France)
- DE (Germany)
- IN (Indonesia)
- IT (Italy)
- BR (Brazil)
- ES (Spain)
- MX (Mexico)
Don't mix those countries and languages as they belong together.
At the moment it does not always work as some data is not translated or not available in the chosen language, but that might change if IMDb adds it.
So far it only seems to affects this methods:
- title()
- photo() (Image is different and has localized text)
- plotoutline()
- recommendation() (titles only)
All configuration options are in /src/config.php:
- $useLocalization = false; (set to true to enable localization, leave to false if you want US English)
- $country = "DE"; (set the desired country) All available options are in the phpdoc, leave double quotes as they are.
- $language = "de-DE"; (set the desired language) All available options are in the phpdoc, leave double quotes as they are.
That is it, if you search for a movie title(), plotoutline() and recommendations() (titles only) are now in the chosen language.
Caching system is been re added and all configuration options are in /src/config.php
Caching is based on per method, when cache is enabled every method will create a cache file
- $cacheDir = './cache/'; (set a directory with write permission by the web server user)
- $useCache = false; (set to true to enable caching)
- $storeCache = false; (set to true enables storing the cached info)
- $cacheUseZip = true; (set to enable or disable the use of zip compression)
- $cacheConvertZip = false; (set to true if you have used gzip in the past but now want to use zip)
- $cacheExpire = 604800; (default cache time in seconds) 604800 == 7 days
To enable logger set the config option $debug to true
Logger only works (at the moment) for the return of GraphQL API call is correct or not