Localizing .strings file
Thread poster: Alessandro Cattelan (X)
Alessandro Cattelan (X)
Alessandro Cattelan (X)
Italy
Local time: 03:11
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.


 
Samuel Murray
Samuel Murray  Identity Verified
Netherlands
Local time: 03:11
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?


 
Alessandro Cattelan (X)
Alessandro Cattelan (X)
Italy
Local time: 03:11
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.


 
Samuel Murray
Samuel Murray  Identity Verified
Netherlands
Local time: 03:11
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).


 
Samuel Murray
Samuel Murray  Identity Verified
Netherlands
Local time: 03:11
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.


 
Samuel Murray
Samuel Murray  Identity Verified
Netherlands
Local time: 03:11
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.


 
Alessandro Cattelan (X)
Alessandro Cattelan (X)
Italy
Local time: 03:11
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.


 
Samuel Murray
Samuel Murray  Identity Verified
Netherlands
Local time: 03:11
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.


 
Alessandro Cattelan (X)
Alessandro Cattelan (X)
Italy
Local time: 03:11
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.


 
Vito Smolej
Vito Smolej
Germany
Local time: 03:11
Member (2004)
English to Slovenian
+ ...
SITE LOCALIZER
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


 
Judy Su
Judy Su
China
Local time: 09:11
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 "


 


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






Protemos translation business management system
Create your account in minutes, and start working! 3-month trial for agencies, and free for freelancers!

The system lets you keep client/vendor database, with contacts and rates, manage projects and assign jobs to vendors, issue invoices, track payments, store and manage project files, generate business reports on turnover profit per client/manager etc.

More info »
Trados Studio 2022 Freelance
The leading translation software used by over 270,000 translators.

Designed with your feedback in mind, Trados Studio 2022 delivers an unrivalled, powerful desktop and cloud solution, empowering you to work in the most efficient and cost-effective way.

More info »