
If PHP were British - morphics
http://www.addedbytes.com/blog/if-php-were-british/
======
peacemaker
As a Brit living in the US I'm getting a bit tired of the strange fascination
you guys have with everything British.

Yes, it was fun at first being asked to say all sorts of words which sound so
funny to you guys. Convincing the more provincial of Americans that yes, we do
in fact get to meet the Queen for a cup of tea on occasion and yes, she is a
very nice lady.

But when I see posts like this I can't help but be reminded of a tired old
joke that no-one thinks is funny anymore but they keep on telling it anyway
because they don't know how to stop.

Or perhaps I'm just being a grumpy old sod. We're famous for that too.

~~~
untog
I'm also a Brit living in the US, and honestly, I'd say just have fun with it
in return. I have, variously:

\- Told people my name is Rupert, Tarquin, or Archibald (no-one will question
it for fear of sounding rude- doubly so because they think we're very
particular about manners)

\- "Where are you from?" "Iowa." "Oh..."

\- "Harry? Oh yeah, good lad. Bit racist but what are you going to do"

And so on, so forth. I certainly don't begrudge an interest in all things
British, because it's preferable to the situation Americans often find
themselves in when abroad, where they're considered cheeseburger eating
morons.

Just think- they _could_ all be asking you when your last football riot was.

~~~
setrofim_
> Harry? Oh yeah, good lad.

Surely, that should be "good old chap", if P.G. Wodehouse taught us anything
;-)

------
freyfogle
On a related note, perl happily let's you subclass the language to the dialect
of your choosing. Here's Australian (ie "strine")

[http://search.cpan.org/~simonw/Acme-Lingua-Strine-
Perl-0.54/...](http://search.cpan.org/~simonw/Acme-Lingua-Strine-
Perl-0.54/Perl.pm)

or perhaps you prefer to program in Nigerian Spammer?

[http://search.cpan.org/~jwalt/Acme-Lingua-
NIGERIAN-1.0.0/NIG...](http://search.cpan.org/~jwalt/Acme-Lingua-
NIGERIAN-1.0.0/NIGERIAN.pm)

~~~
jerf
Or Latin: [http://search.cpan.org/~dconway/Lingua-Romana-
Perligata-0.50...](http://search.cpan.org/~dconway/Lingua-Romana-
Perligata-0.50/lib/Lingua/Romana/Perligata.pm)
[http://www.csse.monash.edu.au/~damian/papers/HTML/Perligata....](http://www.csse.monash.edu.au/~damian/papers/HTML/Perligata.html)

I mention this because this is no mere regex "rename the keywords" exercise
either, but a decent attempt at really making Perl work in grammatical Latin.

------
GotAnyMegadeth

        would_you_mind {
            // Code here
        } actually_i_do_mind (Exception £e) {
            // Politely move on
            cheerio('Message');
        }
    

amazing

~~~
mmahemoff
actually_i_do_mind is a tad confrontational. If I might suggest:

    
    
        would_you_mind {
            // Code here
        } sorry_im_afraid_that_might_present_something_of_a_challenge_right_now (Exception £e) {
            // Politely move on
            cheerio('Message');
        }

~~~
mbesto
Better if it was

    
    
      would_you_mind {
      // Code here
      } i_cant_be_asked (Exception £e) {
      // Politely move on
      cheerio('Message');
      }

~~~
JonnieCache
I think you may have been mishearing <http://en.wiktionary.org/wiki/arsed>

~~~
radiowave
Yes. I've heard a few stories of foreigners getting that wrong when working in
the UK. Suffice it to say that, "I can't be arsed" is not a great thing to say
to your boss.

------
gadders
If they made it British it would probably have one of the best queuing
mechanisms as well.

~~~
modoc
Said someone who's obviously never gone through the immigration line at
Heathrow... The most disorganized, slow, and unfair queue I've ever been in:(

~~~
rimantas
But are people in that line all British? If not, then is just proves the
point.

~~~
claudius
The fact that British are good at queuing (they’re not) wouldn’t imply that
they’re good at organising queues (again, also not true).

------
thomseddon
<http://spiffingcss.com/> deserves a mention here "the preprocessor made for
Brits"

No more scratching heads when things like the following don't work:

#id {

    
    
      text-align: centre;
      text-transform: capitalise;

}

:)

~~~
buttscicles
I see center and meter so much I often get confused when I'm required to write
them correctly!

~~~
alexkus
Having lived in the US for a few years (but now back in the UK) I get confused
by many of the UK/US spelling differences. Not the -ise/-ize or colo[u]r type
stuff, but things like "tyre/tire", "centre/center", "litre/liter", etc. It'll
eventually sort itself out I suppose.

~~~
stan_rogers
Pity us Canadians, then. We use a pseudorandom mixture of the two. There are,
apparently, rules, but they change weekly and there is something in the
Statute of Westminster that forbids any discussion of them. No two Canadian
English spelling dictionaries agree on anything, nor do any of the style
guides. We just carry on and hope that no more than 30% of our Canadian
readers think we're idiots on any given day.

~~~
claudius
Someone with one watch always knows the time, but someone with two watches is
never quite sure…

------
sdfjkl

      "Parse error: syntax error" -> "You taking the piss, mate?"
    

Because that's British manners too.

------
quarterto

      Yes, connexion.
    

No, connexion. From the Wikipedia article he links:

    
    
      The spelling connexion is now rare in everyday British usage.

~~~
ZoFreX
If you know of any good en-US <-> en-GB references, please let me know!

I manually went through half a dozen dictionary files - all of them were
terrible, full of things like "connexion", and even words that haven't been
used since Chaucer's time. The online dictionaries aren't much use either, all
the American ones are wrong, and the OED is far too out of date to be of any
use (Britain is absorbing a lot of American words and spellings at the moment)

Edit: And let this be a lesson to anyone else trying to localize a website
from en-US to en-GB: Every reference you have to hand is wrong. If you don't
get an actual British English speaker to look over it, we will laugh at you.

Edit2: Dug up some of my notes from an en-GB <-> en-US dictionary file we
attempted to use:

We don't use "gaol" or "gramme" anymore

"Ton" and "tonne" are different measurements, not translations of each other

"Practise" and "practice" are not interchangeable

"Check" cannot be globally replaced with "cheque"

"Terrorise" is not and has never been a word

~~~
BellsOnSunday
> "Terrorise" is not and has never been a word

Really? That's how I've always spelt it.

~~~
ZoFreX
I just looked it up again to be sure, and I am slightly mistaken. OED has both
forms in use in the 1800s and early 1900s, but all usage examples from the
second half of the 1900s onward is -ize only.

------
tterrace
Looks to be down, here's the cache:
[http://webcache.googleusercontent.com/search?q=cache:Fdewfzb...](http://webcache.googleusercontent.com/search?q=cache:Fdewfzbi-
ZkJ:www.addedbytes.com/blog/if-php-were-british/&hl=en&gl=us&strip=1)

------
tomelders
Fun fact, only about 4% of english speakers are english.

I know this article is tongue in cheek, but I like to roll that out when one
of my fellow brits goes on a rant about american english.

Me personally, I go with the american spellings all the way.

~~~
untog
Another fun fact- the "z" spellings are actually the original. After people
left for America, all things French became fashionable, including spelling. A
favourite of mine to pull out when a fellow Brit is spouting language-hate.

(I still use the "s" spellings, though)

~~~
thejosh
Ask them what the official national language is of England as well. ;-)

~~~
bpatrianakos
What is it? I looked it up hoping to be surprised and all I found was that
it's supposedly English (no surprise) and that Polish is now the official
second language apparently. Even Wikipedia didn't help.
<http://en.wikipedia.org/wiki/Languages_of_the_United_Kingdom>

I'm really curious now, please tell us the answer.

~~~
thejosh
England doesn't have an official language (or maybe it was the UK), neither
does the US.

------
Fizzadar
Love it, if only PHP were like this. My favorite is definitely the catch
block, sorry, would_you_mind block!

~~~
ishansharma
actually_i_do_mind cheerio :)

------
mrspeaker
I made a similar thing for my French company: Javascripte - Un langage pour
les vrais JavaScripteurs.
[https://github.com/mrspeaker/javascripte/blob/master/index.h...](https://github.com/mrspeaker/javascripte/blob/master/index.html)
It's JavaScript in French (made with Sweet.js macros). All programs are
required to commence with "Bonjour Ordinateur".

~~~
touristtam
I was half expecting this from a fellow 'cheese-eating surrendering monkey'
(British derogatory term for my country folks). XD

------
pettazz
This article pops up every few months, but I still love it every time.

    
    
      cheerio('Message');

------
Gigablah
Right, now try PHP in Cockney rhyming slang.

~~~
mjt0229
You beat me to it.

------
Jeremy1026
An oldie, but goodie.

------
zalew
<https://news.ycombinator.com/item?id=2906480>

<https://github.com/dzautner/British-PHP>

------
DaveChild
I read HN every day. And yet, somehow, I miss my own work appearing here.
Typical. I was probably too engrossed in drinking tea and eating scones to see
it.

------
DomBlack
This is worth a patch to PHP core... not that it would get accepted.

~~~
pyre
Why wouldn't they accept localization efforts? ;-)

~~~
gambiting
I am of an opinion that it should be an option for people who really want it,
but it should not be an acceptable industry practice to write code/comments in
a language other than English. Latest example of this is the official Sony PSM
SDK, which has half of its documentation and code comments in Japanese. So now
Sony has to pay somebody to actually translate it, instead of simply insisting
on their Japanese programmers using English in the first place, which I am
pretty sure they are perfectly capable of. The same situation with the
official PS3 SDK - but that was released more than 7 years ago now,so I doubt
that they will ever fix it. And that's a product for which you have to pay
serious money as well, so it's completely unacceptable.

~~~
lil_cain
Have you ever tried to work in a language other than your own? It's non-
trivially harder. Also, Sony sell their SDK in several countries - why
translate it into English, rather than say, Spanish (or insist they use
English, rather than Spanish).

~~~
gambiting
Of course I have, English is not my native language and all of my code and all
of my comments are in English. I frown upon people who write comments in my
own language in the code, I see it as not professional.

And insist on using English, because most programming languages are in
English. It is defacto standard for programming and computers in general, and
I am not discussing it - it's just how it is. Therefore selling a commercial
product and providing documentation only in Japanese is a massive oversight on
Sony's part.

------
timdorr
Please tell me someone has implemented most of the control structure stuff as
a DSL in Ruby. I would find that a most hilarious prank.

------
porker
O that someone would create a preprocessor so I can write like this - it would
be spiffing!

------
ericcholis
perchance...otherwise is awesome.

