function localize(key) {
    return TRANSLATIONS[key];
}
function localize(key,substitutions) {
    translation = TRANSLATIONS[key] || key;
    for (subs_key in substitutions) {
        regexp = new RegExp('{{'+subs_key+'}}','i');
        translation = translation.replace(regexp,substitutions[subs_key])
    }
    return translation;
}
var TRANSLATIONS = new Object();

TRANSLATIONS['js_click_to_view'] = 'click to view {{pano_title}}';
TRANSLATIONS['js_close_x'] = 'close x';
TRANSLATIONS['js_description'] = 'Description';
TRANSLATIONS['js_enter_email'] = 'Please enter a valid email address';
TRANSLATIONS['js_enter_name'] = 'Please enter your full name';
TRANSLATIONS['js_image_page'] = 'Image page';
TRANSLATIONS['js_leave_comment'] = 'Please leave a comment';
TRANSLATIONS['js_loading'] = 'loading...';
TRANSLATIONS['js_map_controls'] = 'Use the map controls on the right side of the map to go to another location.';
TRANSLATIONS['js_no_results'] = 'No matching results';
TRANSLATIONS['js_n_images'] = '{{n}} images here.';
TRANSLATIONS['js_n_more'] = '{{n}} more...';
TRANSLATIONS['js_or'] = 'or';
TRANSLATIONS['js_select_loc'] = 'Select from the following locations:';
TRANSLATIONS['js_show_more'] = 'Show more';
TRANSLATIONS['js_show_pano'] = 'Show panorama';
TRANSLATIONS['js_show_world'] = 'Show world map';
TRANSLATIONS['js_view_image_page'] = 'View image page of {{title}} on 360Cities.net';
TRANSLATIONS['js_zoom_in'] = 'Zoom in';
TRANSLATIONS['js_zoom_or_click'] = '{{zoom}} or Click an image';
