Automatically changing 55,66€ to €55.66 throughout a document
Thread poster: Edward Potter

Edward Potter  Identity Verified
Spain
Local time: 05:13
Member (2003)
Spanish to English
+ ...
Aug 9, 2015

The title of the post says it all. Who knows how to reposition a currency symbol (and the decimal points/commas while you are at it)?

This has been bothering me for a long time. Is there anyone out there who knows how to do this in MS-Word?


 

philgoddard
United States
Member (2009)
German to English
+ ...
Funny you should mention this Aug 10, 2015

I'm doing a document containing about 600 instances of this problem.

You could do Search and Replace All to delete the € signs, and then another nine Search and Replaces to put a € before each digit from 1 to 9, though this still doesn't fully solve the issue.

Maybe you could write a macro if you knew how, but I don't.

The other solution is the one that large numbers of translators adopt for some reason: leave the € after the number.

[Edited at 2015-08-10 04:01 GMT]


 

Tony M
France
Local time: 05:13
Member
French to English
+ ...
wordfast user manual? Aug 10, 2015

Although you don't actually need Wordfast to do it, I believe there is a search-&-replace sequence given in the User Manual that explains how to do it, as a way of doing pre-translation processing.

I'll see if I can find it for you, but in the meantime, that may give you something to start from...

Here are two extracts from the Wordfast manual, which explain similar processes, and which you could adapt to your specific requirements:

Turning US financial number formatting into French [You can, of course, equally well modify this to work the other way round]
This means changing US thousand separators (commas) into non-breaking spaces, and US decimal separators (full stops) into commas. Here is a two-pass method:

Find what .([0-9][0-9])>
Replace with ,\1
Use Wildcards

then,

Find what ([0-9]),([0-9][0-9][0-9])
Replace with \1^s\2
Use Wildcards

Use this FR in automatic mode ("Replace all") if the figures and numbers in your document are essentially financial. If, however, your document mixes scientific figures with financial figures, I recommend using this FR method with a visual confirmation for each replacement (in Ms-Word's "Find" dialog box, click "Find Next" and "Replace" rather than "Replace all").


Replacing numbers [This method could be adapted to move the € symbol]
A segmentation problem had produced segments where match values were often over 100. So the documents had such match values as or etc. It appeared that the last figure of the match value had been duplicated (these two segments should have been .and ). How could this be fixed in many documents, in one pass, making sure other figures are not modified by the procedure?

The answer is:

Find what (\)
Replace with \1\2\3\5
Use Wildcards

Explanation: When the "Match wildcards" checkbox is checked, "expressions" are anything contained within parentheses. The "Replace with" numbers actually refers to expressions located in the "Find what" argument.

The ([1-9]) expression in the "Find what" argument, for example, refers to any number in the range 1 - 9. In the "Replace with" argument, it is referred to as \1, meaning, "expression 2".

So the FR action can be read as:

Look for chunks of text made of the following 5 contiguous expressions:

1. )

If such a chunk of text is found, replace the entire chunk with expressions 1, 2, 3, 5.

As a result, the redundant number (expression 4) is deleted from match values, with no risk of upsetting the rest of the document. An added safety measure could be to set the style for the Search parameter to "tw4winMark".

The manual also mentions that the PlusTools utility (free, and separate from Wordfast) has a function that enables you to perform F&R operations across multiple files.


[Modifié le 2015-08-10 06:36 GMT]


 

Philip Lees  Identity Verified
Greece
Local time: 06:13
Member (2008)
Greek to English
Use wildcards (primitive form of regular expressions) Aug 10, 2015

Edward Potter wrote:

how to reposition a currency symbol (and the decimal points/commas while you are at it)?



With "Use wildcards" checked, replace

([0-9]@),([0-9]@)€

with

€\1.\2

Caveats:

1. Make sure you have a copy of the original saved somewhere.

2. This assumes that all the search cases are well formed, as in your example.

The search pattern means: find each instance of (some decimal digits), followed by a comma, followed by (some decimal digits), followed by the Euro symbol.

Then replace it with the Euro symbol, the first found pattern, a . and then the second found pattern.

Hope this helps.


 

Samuel Murray  Identity Verified
Netherlands
Local time: 05:13
Member (2006)
English to Afrikaans
+ ...
F/R with wildcards Aug 10, 2015

Edward Potter wrote:
Is there anyone out there who knows how to do this in MS-Word?


Find what: ( [ 0 - 9 ] @ ) ( , ) ( [ 0 - 9 ] @ ) ( € )
Replace with: \ 4 \ 1 . \ 3
Wildcards: enabled

(remove spaces added due to decade-old malfunction in ProZ.com's forum software)


 


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


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

Automatically changing 55,66€ to €55.66 throughout a document

Advanced search






SDL Trados Studio 2019 Freelance
The leading translation software used by over 250,000 translators.

SDL Trados Studio 2019 has evolved to bring translators a brand new experience. Designed with user experience at its core, Studio 2019 transforms how new users get up and running and helps experienced users make the most of the powerful features.

More info »
SDL Trados Studio 2019 Freelance
The leading translation software used by over 250,000 translators.

SDL Trados Studio 2019 has evolved to bring translators a brand new experience. Designed with user experience at its core, Studio 2019 transforms how new users get up and running, helps experienced users make the most of the powerful features, ensures new

More info »



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