Converting phone numbers
Téma indítója: Lori Cirefice
Lori Cirefice
Lori Cirefice  Identity Verified
Franciaország
Local time: 16:52
francia - angol
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
Németország
Local time: 16:52
angol - német
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
Franciaország
Local time: 16:52
francia - angol
TÉMAINDÍTÓ
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
Franciaország
Local time: 16:52
ProZ.com-tag
francia - angol
+ ...
A WEBOLDALAT LOKALIZÁLÓ FORDÍTÓ
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
Franciaország
Local time: 16:52
francia - angol
TÉMAINDÍTÓ
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






Anycount & Translation Office 3000
Translation Office 3000

Translation Office 3000 is an advanced accounting tool for freelance translators and small agencies. TO3000 easily and seamlessly integrates with the business life of professional freelance translators.

More info »
Trados Studio 2022 Freelance
The leading translation software used by over 270,000 translators.

Designed with your feedback in mind, Trados Studio 2022 delivers an unrivalled, powerful desktop and cloud solution, empowering you to work in the most efficient and cost-effective way.

More info »