Skip to main content

Overview

The translations configuration provides Spanish language mappings for Pokemon-related terms. These are used to display localized content throughout the application.

Type Translations

typeTranslations

Maps English Pokemon type names to their Spanish equivalents.
typeTranslations: {
    'normal': 'Normal',
    'fire': 'Fuego',
    'water': 'Agua',
    'electric': 'Eléctrico',
    'grass': 'Planta',
    'ice': 'Hielo',
    'fighting': 'Lucha',
    'poison': 'Veneno',
    'ground': 'Tierra',
    'flying': 'Volador',
    'psychic': 'Psíquico',
    'bug': 'Bicho',
    'rock': 'Roca',
    'ghost': 'Fantasma',
    'dragon': 'Dragón',
    'dark': 'Siniestro',
    'steel': 'Acero',
    'fairy': 'Hada'
}
Structure:
  • Key: English type name (lowercase)
  • Value: Spanish type name (capitalized)
  • Total entries: 18 types

Ability Translations

abilityTranslations

Maps English Pokemon ability names to their Spanish equivalents. This is a comprehensive dictionary covering abilities from all generations.
{
    'overgrow': 'Espesura',
    'blaze': 'Llamarada',
    'torrent': 'Torrente',
    'shield-dust': 'Polvo Escudo',
    'run-away': 'Fuga',
    'keen-eye': 'Vista Lince',
    'guts': 'Agallas',
    'intimidate': 'Intimidación',
    'static': 'Electricidad Estática',
    'lightning-rod': 'Pararrayos'
}
Structure:
  • Key: English ability name (lowercase, kebab-case)
  • Value: Spanish ability name (title case)
  • Total entries: 200+ abilities
The ability translations cover all generations from Gen 1 through Gen 9, including the latest abilities from Pokemon Scarlet and Violet.

Color Translations

colorTranslations

Maps English Pokemon color names to their Spanish equivalents.
colorTranslations: {
    'black': 'Negro',
    'blue': 'Azul',
    'brown': 'Marrón',
    'gray': 'Gris',
    'green': 'Verde',
    'pink': 'Rosa',
    'purple': 'Morado',
    'red': 'Rojo',
    'white': 'Blanco',
    'yellow': 'Amarillo'
}
Structure:
  • Key: English color name (lowercase)
  • Value: Spanish color name (capitalized)
  • Total entries: 10 colors

Habitat Translations

habitatTranslations

Maps English Pokemon habitat names to their Spanish equivalents.
habitatTranslations: {
    'cave': 'Cueva',
    'forest': 'Bosque',
    'grassland': 'Pradera',
    'mountain': 'Montaña',
    'rare': 'Raro',
    'rough-terrain': 'Terreno Áspero',
    'sea': 'Mar',
    'urban': 'Urbano',
    'waters-edge': 'Orilla del Agua'
}
Structure:
  • Key: English habitat name (lowercase, kebab-case)
  • Value: Spanish habitat name (capitalized)
  • Total entries: 9 habitats

Usage Examples

const pokemonType = 'fire';
const spanishType = constants.typeTranslations[pokemonType];
console.log(spanishType); // 'Fuego'

// Display all types in Spanish
const types = ['fire', 'water', 'grass'];
const translatedTypes = types.map(type => constants.typeTranslations[type]);
// ['Fuego', 'Agua', 'Planta']
const ability = 'overgrow';
const spanishAbility = constants.abilityTranslations[ability];
console.log(spanishAbility); // 'Espesura'

// Handle missing translations
const getTranslatedAbility = (ability) => {
    return constants.abilityTranslations[ability] || ability;
};
// Translate Pokemon color
const color = 'blue';
const spanishColor = constants.colorTranslations[color];
console.log(spanishColor); // 'Azul'

// Translate Pokemon habitat
const habitat = 'forest';
const spanishHabitat = constants.habitatTranslations[habitat];
console.log(spanishHabitat); // 'Bosque'
// Translate all Pokemon data to Spanish
function translatePokemonData(pokemon) {
    return {
        name: pokemon.name,
        types: pokemon.types.map(t => 
            constants.typeTranslations[t] || t
        ),
        abilities: pokemon.abilities.map(a => 
            constants.abilityTranslations[a] || a
        ),
        color: constants.colorTranslations[pokemon.color] || pokemon.color,
        habitat: constants.habitatTranslations[pokemon.habitat] || pokemon.habitat
    };
}
All translation values use proper Spanish capitalization and include accented characters where appropriate (e.g., “Eléctrico”, “Psíquico”, “Dragón”).

Build docs developers (and LLMs) love