Mobile menu

Localizing .strings file
Thread poster: Alessandro Cattelan
Alessandro Cattelan
Italy
Local time: 10:52
English to Italian
+ ...
Mar 15, 2008

Hello,
I've been dealing with a lot of .strings files lately and translating them is not too difficult - they are just text files with a very simple structure. However, I was wondering whether there is a tool that can extract the translatable text in order to do the translation in a CAT tool. One solution is to mark the text so that it can be translated with Trados in Word, but I was looking for some better way to handle these files. Any suggestion?
Thanks,
Ale.


Direct link Reply with quote
 

Samuel Murray  Identity Verified
Netherlands
Local time: 10:52
Member (2006)
English to Afrikaans
+ ...
Well, what is in it? Mar 16, 2008

Alessandro Cattelan wrote:
I've been dealing with a lot of .strings files lately and translating them is not too difficult - they are just text files with a very simple structure.


So... where can we see some samples of these .strings files?


Direct link Reply with quote
 
Alessandro Cattelan
Italy
Local time: 10:52
English to Italian
+ ...
TOPIC STARTER
sample Mar 16, 2008

Samuel Murray wrote:

Alessandro Cattelan wrote:
I've been dealing with a lot of .strings files lately and translating them is not too difficult - they are just text files with a very simple structure.


So... where can we see some samples of these .strings files?


Hi Samuel,
here's a sample:

/* No comment provided by engineer. */
"Open new window" = "Open new window";

/* No comment provided by engineer. */
"Close window" = "Close window";

/* No comment provided by engineer. */
"Close all windows" = "Close all windows";


I know you'll come up with some good script to do the trick... ;o)

Ale.


Direct link Reply with quote
 

Samuel Murray  Identity Verified
Netherlands
Local time: 10:52
Member (2006)
English to Afrikaans
+ ...
Using OmegaT Mar 16, 2008

Alessandro Cattelan wrote:

Here's a sample:

/* No comment provided by engineer. */
"Open new window" = "Open new window";

I know you'll come up with some good script to do the trick...


No script necessary. It's possible in OmegaT, although its a little geeky:

1. Go Options -> File Filters
2. Click "Text"
3. Add ".string" to it

1. Go Options -> Segmentation
2. Click "Add" and then scroll down to edit the "new language"
3. Move the new language to the top, rename it "Exceptions", and change the "language pattern" to ".*" (dot star).
4. Select the newly created Exceptions segmentation filter, and in the bottom part of the dialog box add the following two rules:

Break: yes
Pattern before: " = "
Pattern after: (empty)

Break: yes
Pattern before: (empty)
Pattern after: ";

1. Go Options -> Editing behaviour
2. Select "Leave the segment empty". You can activate fuzzy insertion if you want.

Then remember to manually skip the segments that don't need translating (you'll see which ones).


Direct link Reply with quote
 

Samuel Murray  Identity Verified
Netherlands
Local time: 10:52
Member (2006)
English to Afrikaans
+ ...
In Wordfast Mar 16, 2008

Alessandro Cattelan wrote:
Here's a sample:

/* No comment provided by engineer. */
"Open new window" = "Open new window";

/* No comment provided by engineer. */
"Close window" = "Close window";


In Wordfast, you need to mark the untranslatable text with Marching Red Ants and then remember to set that feature in Wordfast as well.

1. Open the file in MS Word.
2. Save as MS Word file (DOC).
3. Do the following Find/Replace:

Find what:
^p
Replace with:
^l

Find what:
(\";^l^l)(*)(\"=\")
with wildcards enabled (click "Advanced" on the Find/Replace box)
Replace with:
\1\2\3
and while your cursor is in the "Replace" box, go Format, Font, Text effects, Marching red ants.

4. In WF, go Setup, Segments, Use marching red ants.
5. Do this Find/Replace:

Find what:
^l
Replace with:
^p

6. Translate using WF.
7. After you've cleaned and everything, save as "Encoded text", and then rename the file back to ".strings".

If you don't want to *see* those annoying red ants, in MS Word go Tools, Options, View, deselect Animated text.


Direct link Reply with quote
 

Samuel Murray  Identity Verified
Netherlands
Local time: 10:52
Member (2006)
English to Afrikaans
+ ...
Not sure about Trados... Mar 16, 2008

Alessandro Cattelan wrote:
One solution is to mark the text so that it can be translated with Trados in Word, but I was looking for some better way to handle these files.


I'm not sure if Trados supports the "marching red ants" method, but remember you can use the same find/replace mentioned above and instead of changing the font to "marching red ants", simply change the style to "tw4winExternal". Trados should be able to handle that.


Direct link Reply with quote
 
Alessandro Cattelan
Italy
Local time: 10:52
English to Italian
+ ...
TOPIC STARTER
Thanks Mar 16, 2008

Samuel Murray wrote:

Alessandro Cattelan wrote:
One solution is to mark the text so that it can be translated with Trados in Word, but I was looking for some better way to handle these files.


I'm not sure if Trados supports the "marching red ants" method, but remember you can use the same find/replace mentioned above and instead of changing the font to "marching red ants", simply change the style to "tw4winExternal". Trados should be able to handle that.


The OmegaT method works quite well. However, I'd need to be able to export the filter setting in order to let other translators work on the same files with the same settings. Is that possible with OmegaT?

The other two methods look quite interesting but I can't try them now as I don't have Wordfast or Trados installed on this machine. I'll give them a try tomorrow night when I'll be working on my main PC.

Thanks again,
Ale.


Direct link Reply with quote
 

Samuel Murray  Identity Verified
Netherlands
Local time: 10:52
Member (2006)
English to Afrikaans
+ ...
It is, and it isnt Mar 16, 2008

Alessandro Cattelan wrote:
The OmegaT method works quite well. However, I'd need to be able to export the filter setting in order to let other translators work on the same files with the same settings. Is that possible with OmegaT?


Theoretically, yes.

In Windows, OmegaT's segmentation rules are stored here:
C:\Documents and Settings\User\Application Data\OmegaT
(in a file named segmentation.conf)

Close OmegaT (after you've added the rules, of course), then copy this file and send it zipped (or not) to your translators.

The "Application Data" folder is often a hidden folder, so users must enable viewing of hidden folders first. Then they should make a backup of their segmentation.conf file (if they have created their own segmentation rules in the past). Then they replace the existing segmentation.conf file with the one that you had e-mailed to them.

They must not have OmegaT running while they do the copy/overwrite.

I have no idea where Linux or OSX stores this file. Note that the file contains *all* your segmentation rules, not just the ones created for this project.

This file does not contain any information about Editing Options or File Filters etc, so you may want to just rename your .string files to .utf8 or .txt anyway, unless you can successfully tell your translators how to update those.


Direct link Reply with quote
 
Alessandro Cattelan
Italy
Local time: 10:52
English to Italian
+ ...
TOPIC STARTER
php script Apr 26, 2008

In case anyone is interested, I eventually wrote a very simple PHP script which turns the .strings file into an XML document that can easily be translated with Trados Tag Editor using an ad hoc DTD.

If anyone should ever need it, just send me an email.

Ale.


Direct link Reply with quote
 

Vito Smolej
Germany
Local time: 10:52
Member (2004)
English to Slovenian
+ ...
This whole thread goes into the OmegaT's "How do I" May 22, 2008

just send me an email.

Send me the file, Alessandro, just in case. In the mean time, I guess I'll keep OmegaT ready (g).

Regards


Direct link Reply with quote
 

Judy Su
China
Local time: 16:52
English to Chinese
Use Passolo Jun 16, 2008

Alessandro Cattelan wrote:

Hello,
I've been dealing with a lot of .strings files lately and translating them is not too difficult - they are just text files with a very simple structure. However, I was wondering whether there is a tool that can extract the translatable text in order to do the translation in a CAT tool. One solution is to mark the text so that it can be translated with Trados in Word, but I was looking for some better way to handle these files. Any suggestion?
Thanks,
Ale.

Use Passolo's customized parser, you can easily handle these .string files in a batch way.
tell the parser your string start with = ", end with "


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 »

Localizing .strings file

Advanced search






memoQ translator pro
Kilgray's memoQ is the world's fastest developing integrated localization & translation environment rendering you more productive and efficient.

With our advanced file filters, unlimited language and advanced file support, memoQ translator pro has been designed for translators and reviewers who work on their own, with other translators or in team-based translation projects.

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 »



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