|
发表于 2009-12-9 09:01 PM
|
显示全部楼层
thanks
just some replacement and add an "eh?"
input = document.Canadian.input.value
input = input.replace(/humor/i, 'humour');
input = input.replace(/color/i, 'colour');
input = input.replace(/cheese fries/i, 'poutine');
input = input.replace(/cheese frie/i, 'poutine');
input = input.replace(/1 buck/i, 'loonie');
input = input.replace(/2 bucks/i, 'toonie');
input = input.replace(/one buck/i, 'loonie');
input = input.replace(/two bucks/i, 'toonie');
input = input.replace(/behavior/i, 'behaviour');
input = input.replace(/candor/i, 'candour ');
input = input.replace(/catalog/i, 'catalogue');
input = input.replace(/center/i, 'centre');
input = input.replace(/check/i, 'cheque');
input = input.replace(/clamor/i, 'clamour');
input = input.replace(/counselor/i, 'counsellor ');
input = input.replace(/demeanor/i, 'demeanour');
input = input.replace(/dialog/i, 'dialogue');
input = input.replace(/endeavor/i, 'endeavour ');
input = input.replace(/favor/i, 'favour');
input = input.replace(/fiber/i, 'fibre');
input = input.replace(/flavor/i, 'flavour');
input = input.replace(/gray/i, 'grey');
input = input.replace(/harbor/i, 'harbour');
input = input.replace(/honor/i, 'honour');
input = input.replace(/humor/i, 'humour');
input = input.replace(/jewelry/i, 'jewellery');
input = input.replace(/kilometer/i, 'kilometre');
input = input.replace(/labor/i, 'labour');
input = input.replace(/license/i, 'licence');
input = input.replace(/liter/i, 'litre');
input = input.replace(/maneuver/i, 'manoeuvre');
input = input.replace(/marvelous/i, 'marvellous');
input = input.replace(/maximize/i, 'maximize');
input = input.replace(/meager/i, 'meagre');
input = input.replace(/meter/i, 'metre');
input = input.replace(/modeled/i, 'modelled');
input = input.replace(/modeling/i, 'modelling');
input = input.replace(/mold/i, 'mould');
input = input.replace(/neighbor/i, 'neighbour');
input = input.replace(/offense/i, 'offence');
input = input.replace(/parlor/i, 'parlour');
input = input.replace(/practice/i, 'practise');
input = input.replace(/pajamas/i, 'pyjamas');
input = input.replace(/rancor/i, 'rancour');
input = input.replace(/rigor/i, 'rigour');
input = input.replace(/savior/i, 'saviour');
input = input.replace(/slipped disk/i, 'slipped disc');
input = input.replace(/sulfur/i, 'sulphur');
input = input.replace(/theater/i, 'theatre');
input = input.replace(/theatergoer/i, 'theatregoer');
input = input.replace(/tumor/i, 'tumour');
input = input.replace(/valor/i, 'valour');
input = input.replace(/vapor/i, 'vapour');
input = input.replace(/vigor/i, 'vigour');
input = input.replace(/woolen/i, 'woollen');
input = input.replace(/sled/i, 'toboggan');
input = input.replace(/a case of 24 beers/i, 'two-four');
input = input.replace(/bathroom/i, 'washroom'); |
|