NicklasWallgren / PokemonGoAPI-PHP

Pokemon Go API PHP library
BSD 2-Clause "Simplified" License
130 stars 51 forks source link

language problem #174

Closed hwiVeloper closed 7 years ago

hwiVeloper commented 7 years ago

I wanna change pokemon's name to my country's language. How can I convert pokemon's name or movement's name?(e.g. Bulbasaur, hydro pump etc..)

(I also wanna maintain original name source - pogoprotos-php/src/POGOProtos/Enums/*)

NicklasWallgren commented 7 years ago

You'll have to do it outside the library, since it doesn't support that type of functionality.

xmillies commented 7 years ago

I do like this.

class IXLA
{
    // 801 pokémons (source http://www.pokemon.com/fr/pokedex/)
    const POKEMON_FRENCH_NAME = array (
        1 => 'Bulbizarre',
        2 => 'Herbizarre',
        ....
        798 => 'Katagami',
        799 => 'Engloutyran',
        800 => 'Necrozma',
        801 => 'Magearna',
    );
}

Call : 

'nameFr' => IXLA::POKEMON_FRENCH_NAME[$i]
hwiVeloper commented 7 years ago

@xmillies Thanx! I solved the problem :) 👍