Studio 2009 - Auto Substitution Thread poster: HH Liefers
|
How to automatically transform "$xxx.yy" to "xxx,yy°USD"? Is there a way to have currency values like the above automatically inserted into target text the way as indicated above? Or would this require to extend the Studio "Measurements" functionality to include an option for defining customized "measurements"? | | | Jerzy Czopik Germany Local time: 18:57 Member (2003) Polish to German + ... Search and replace in filtered view | Aug 7, 2010 |
...would be my answer to this. So for just number segments like $ xxx.xx it would be quite easy I think - use ^\$ to show all segments beginning with the $ sign, then use search & replace operator to do the trick - or at least I hope it is possible similar to Word. Never tried that however. An automated replacement for that does not exist AFAIK. Regards Jerzy | | | HH Liefers Local time: 18:57 English to German TOPIC STARTER Complicated replacement | Aug 7, 2010 |
If there's a $ (or whatever symbol) in front of the number (no space between $ and the value!), Studio does no longer identify the number as a number. Therefore you need to manually edit each number, because you have to replace "." with "," and "," with "." when translating EN>DE. May be there is some complex regular expression to achieve this, but I don't know. Also, the replacement includes to move the currency symbol from the front to the back of the expression (including a non-breakabl... See more If there's a $ (or whatever symbol) in front of the number (no space between $ and the value!), Studio does no longer identify the number as a number. Therefore you need to manually edit each number, because you have to replace "." with "," and "," with "." when translating EN>DE. May be there is some complex regular expression to achieve this, but I don't know. Also, the replacement includes to move the currency symbol from the front to the back of the expression (including a non-breakable space or an individual thin space). At least the latter can be achieved by regular expressions... ▲ Collapse | | | Jerzy Czopik Germany Local time: 18:57 Member (2003) Polish to German + ... I agrree - complicated | Aug 7, 2010 |
If the source would be Word or if you would be able to open source in Word, I would do this operation in Word, where the use of regex is much simplier than in Studio. | |
|
|
[Módosítva: 2010-08-08 11:55 GMT] | | |
Of course, before trying this, make a copy of the file to be changed. In the Edit/Find and Replace window check Use and select Regular expressions from the drop-down menu. „Less than” should be replaced everywhere with its symbol, which I could not insert in the text. 1. Find: (?less than=\$[1-9][0-9]{2}\.[0-9]{2})\s Replace with: _USD_ 2. Find: (?less than=\$[1-9][0-9]{2}\.[0-9]{2})\. Replace with: _USD. 3. Find: (?less than=\$[1-9][0-9]{2}\.[0-9]{2}), ... See more Of course, before trying this, make a copy of the file to be changed. In the Edit/Find and Replace window check Use and select Regular expressions from the drop-down menu. „Less than” should be replaced everywhere with its symbol, which I could not insert in the text. 1. Find: (?less than=\$[1-9][0-9]{2}\.[0-9]{2})\s Replace with: _USD_ 2. Find: (?less than=\$[1-9][0-9]{2}\.[0-9]{2})\. Replace with: _USD. 3. Find: (?less than=\$[1-9][0-9]{2}\.[0-9]{2}), Replace with: _USD, 4. Find (?less than=\$[1-9][0-9]{2}). Replace with: , 5. Find \$(?=[1-9][0-9]{2},) Replace with: (leave blank) 1. Inserts USD if the number is followed by a whitespace. 2. ~ ... followed by a full stop. 3. ~ …followed by a comma. 4. Replaces decimal (.) with decimal (,). 5. Deletes $ if it is the first character of a number. 2. and/or 3. can be omitted (if they do not occur in the text), but this order of the replacements should be kept. Hope this works in the target text. ▲ Collapse | | | Jerzy Czopik Germany Local time: 18:57 Member (2003) Polish to German + ... Side note: use Entities if you need symbols like less than in this forum | Aug 8, 2010 |
To insert <, use & lt ; (without blanks, obviously), or & gt ; for > | | |
...for the info. I haven't known that. | | | To report site rules violations or get help, contact a site moderator: You can also contact site staff by submitting a support request » Studio 2009 - Auto Substitution 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 » |
| 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! » |
|
| | | | X Sign in to your ProZ.com account... | | | | | |