Converting phone numbers
Thread poster: Lori Cirefice

Lori Cirefice  Identity Verified
France
Local time: 16:09
French to English
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 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!


Direct link Reply with quote
 

Endre Both  Identity Verified
Germany
Local time: 16:09
Member (2002)
English to 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]


Direct link Reply with quote
 

Lori Cirefice  Identity Verified
France
Local time: 16:09
French to English
TOPIC STARTER
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]


Direct link Reply with quote
 

Tony M  Identity Verified
France
Local time: 16:09
Member
French to English
+ ...
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.

Direct link Reply with quote
 

Lori Cirefice  Identity Verified
France
Local time: 16:09
French to English
TOPIC STARTER
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.


Direct link Reply with quote
 


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

Advanced search






BaccS – Business Accounting Software
Modern desktop project management for freelance translators

BaccS makes it easy for translators to manage their projects, schedule tasks, create invoices, and view highly customizable reports. User-friendly, ProZ.com integration, community-driven development – a few reasons BaccS is trusted by translators!

More info »
PerfectIt consistency checker
Faster Checking, Greater Accuracy

PerfectIt helps deliver error-free documents. It improves consistency, ensures quality and helps to enforce style guides. It’s a powerful tool for pro users, and comes with the assurance of a 30-day money back guarantee.

More info »



Forums
  • All of ProZ.com
  • Term search
  • Jobs
  • Forums
  • Multiple search