Converting phone numbers
Inițiatorul discuției: Lori Cirefice
Lori Cirefice
Lori Cirefice  Identity Verified
Franţa
Local time: 14:33
din franceză în engleză
Aug 5, 2009

I have a large Word document to translate, including LOTS of phone numbers and addresses.

The client has requested that phone numbers in the local format 04 XX XX XX XX be converted to a more international format +33 (0)4 XX XX XX XX.

I would like to find a way to automate this process to save time. I don't think I can use Word's find/replace to do this, I probably need a macro?

I am hoping to define it so that numbers in the 0X XX XX XX XX format would be
... See more
I have a large Word document to translate, including LOTS of phone numbers and addresses.

The client has requested that phone numbers in the local format 04 XX XX XX XX be converted to a more international format +33 (0)4 XX XX XX XX.

I would like to find a way to automate this process to save time. I don't think I can use Word's find/replace to do this, I probably need a macro?

I am hoping to define it so that numbers in the 0X XX XX XX XX format would be recognized & the initial 0 replaced by "+33 (0)".

Unless there is a way to do this using Wordfast or MemoQ? I haven't yet decided which CAT tool to use for this project, so if anyone knows of a good way to do this, please let me know!
Collapse


 
Endre Both
Endre Both  Identity Verified
Germania
Local time: 14:33
din engleză în germană
Do it in Word Aug 5, 2009

In the Search and Replace box, activate "Use wildcards", and try for example this:

Search for:
04([0-9 ]{8;12})

Replace:
+33 (0)4\\1

This replaces character sequences containing 8 to 12 digits or spaces after the 04 so you don't have to care whether or not the numbers are partitioned by spaces. Depending on the content of the text, you may get a few false positives though.

Endre

[Bearbeitet am 2009-08-05 11:48 GMT]


 
Lori Cirefice
Lori Cirefice  Identity Verified
Franţa
Local time: 14:33
din franceză în engleză
INIŢIATORUL SUBIECTULUI
Thanks Aug 5, 2009

Thanks Endre! This does the job quite nicely! I think I will modify it slightly like this:

Search for:
Tél. 04([0-9 ]{8;12})

Replace:
Phone +33 (0)4\1

It will be safer this way to make sure I'm not replacing anything besides phone numbers. The nice thing about the document is that all the data is entered in a very uniform way.

Edit: the backslash is not showing up for some reason

[Edited at 2009-08-05 12:50 GMT]


 
Tony M
Tony M
Franţa
Local time: 14:33
Utilizator
din franceză în engleză
+ ...
SITE LOCALIZER
Simpler still! Aug 6, 2009

You could, of course, simply search for [space]04 and replace with [space]+33 (0)4; what follows is irrelevant. In most docs, I wouldn't imagine you'd find many other numbers starting with a leading '04', but of course, your dodge of including the 'Tél.' would make absolutely certain.

 
Lori Cirefice
Lori Cirefice  Identity Verified
Franţa
Local time: 14:33
din franceză în engleză
INIŢIATORUL SUBIECTULUI
yes, possible Aug 7, 2009

Tony M wrote:

You could, of course, simply search for [space]04 and replace with [space]+33 (0)4; what follows is irrelevant. In most docs, I wouldn't imagine you'd find many other numbers starting with a leading '04', but of course, your dodge of including the 'Tél.' would make absolutely certain.


That might work too, initially I had rejected that idea because there could be phone numbers like 04 91 04 04 04 (all the phone numbers have spaces between the sets) so I was worried about accidentally replacing numbers that shouldn't be replaced. It wasn't until later on that I had the idea about including the "Tél" in the search. I also have zip codes and street numbers, so including "Tél" should eliminate that risk.


 


To report site rules violations or get help, contact a site moderator:


You can also contact site staff by submitting a support request »

Converting phone numbers






TM-Town
Manage your TMs and Terms ... and boost your translation business

Are you ready for something fresh in the industry? TM-Town is a unique new site for you -- the freelance translator -- to store, manage and share translation memories (TMs) and glossaries...and potentially meet new clients on the basis of your prior work.

More info »
Wordfast Pro
Translation Memory Software for Any Platform

Exclusive discount for ProZ.com users! Save over 13% when purchasing Wordfast Pro through ProZ.com. Wordfast is the world's #1 provider of platform-independent Translation Memory software. Consistently ranked the most user-friendly and highest value

Buy now! »