🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: adobe.scripting.indesign
5 messages
5 total messages Started by Miles Linklater Mon, 23 Feb 2009 17:45
English numbers to French?
#1077
Author: Miles Linklater
Date: Mon, 23 Feb 2009 17:45
1 lines
1108 bytes
I'm working on a massive English annual report right now. When it comes to the French the client will be providing a translation of the text, but not the numbers that appear in the financial statements; I am to take the numbers from the English. Rather than manually change all the formatting of the English numbers I'm wondering how to do a search and replace. For example, in English the number 12,450.67 needs to become 12 450,67 in French (comma becomes a space, period becomes a comma). Also things like 45.00% need to become 45,00% (period becomes a comma).
Re: English numbers to French?
#1080
Author: Robert Tkaczyk
Date: Mon, 23 Feb 2009 19:29
8 lines
866 bytes
you don't need scripting for that :)

which version of ID you have ?

robin

-- 
www.adobescripts.com
Re: English numbers to French?
#1082
Author: Miles Linklater
Date: Mon, 23 Feb 2009 19:45
1 lines
681 bytes
The annual report is composed in InDesign CS3. Thank you.
Re: English numbers to French?
#1088
Author: jongware
Date: Mon, 23 Feb 2009 20:33
33 lines
1288 bytes
(?) My previous answer is gone in digital space. (Can anyone hear me scream?)

GREP to the rescue. Search for

      ,(\d\d\d)




and replace with

      ~S$1




This replaces the commas in "12,345.67" with a fixed space. Next, only periods inbetween two digits should be replaced with a comma, right? Search for

      (\d)\.(\d)




and replace with

      $1,$2




The period in the Search expression needs a backslash escape because it's a special character in GREP searches ("any character").

If you need to run this on multiple documents, store each search-and-replace sequence under a logical name, and search this forum for the little script to chain them automatically.
Re: English numbers to French?
#1092
Author: Miles Linklater
Date: Mon, 23 Feb 2009 21:03
1 lines
691 bytes
Brilliant! Many thanks. Worked like a charm and save me a lot of time making the changes manually.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads