function Locales(locales)
{
    this.locale = locales;
    this.getLocale = getLocale;

    switch(this.locale)
    {
        case 'es':
            this.locales = es;
            break;

        case 'ca':
            this.locales = ca;
            break;

        case 'en':
            this.locales = en;
            break;

        case 'fr':
            this.locales = fr;
            break;

        case 'de':
            this.locales = de;
            break;

        case 'nl':
            this.locales = nl;
            break;

        default:
            alert('[ERROR] Unknown language '+this.locale);
    }
}

function getLocale(key)
{
    return this.locales[key];
}

var es = {
    'measured' : 'Medido',
    'forecast' : 'Previsto',
    'animation' : 'Animaci&oacute;n de',
    'captures' : 'capturas',
    'prevision' : 'Previsi&oacute;n',
    'hg' : 'Alto',
    'med' : 'Medio',
    'lw' : 'Bajo'
};

var ca = {
    'measured' : 'Mesurat',
    'forecast' : 'Previst',
    'animation' : 'Animaci&oacute; de',
    'captures' : 'captures',
    'prevision' : 'Previsi&oacute;',
    'hg' : 'Alt',
    'med' : 'Mig',
    'lw' : 'Baix'
};

var en = {
    'measured' : 'Measured',
    'forecast' : 'Forecasted',
    'animation' : 'Maps animation of',
    'captures' : 'images',
    'prevision' : 'Forecasted',
    'hg' : 'High',
    'med' : 'Medium',
    'lw' : 'Low'
};

var fr = {
    'measured' : 'Medido',
    'forecast' : 'Previsto',
    'animation' : 'Maps animation of',
    'captures' : 'images',
    'prevision' : 'Forecast',
    'hg' : 'High',
    'med' : 'Medium',
    'lw' : 'Low'
};

var de = {
    'measured' : 'Medido',
    'forecast' : 'Previsto',
    'animation' : 'Maps animation of',
    'captures' : 'images',
    'prevision' : 'Forecast',
    'hg' : 'High',
    'med' : 'Medium',
    'lw' : 'Low'
};

var nl = {
    'measured' : 'Afgemeten',
    'forecast' : 'Verwachte',
    'animation' : 'Maps animation of',
    'captures' : 'images',
    'prevision' : 'Forecasted',
    'hg' : 'High',
    'med' : 'Medium',
    'lw' : 'Low'
};
