Eclypse supports Visual Studio's resources file (.resw). In order to get started, 

1. Drag and drop a resources file (.resw/.resx) or browse files to locate one within import interface. 

2. If the file type is not recognized automatically, manually select the file type to be resources file.

3. If the language is not recognized automatically, manually select the language.

4. Click the "Configure" button to specify plural handling and placeholder patterns encoded in your resource file.

Eclypse supports version 2.0 resource file. Depending on the Xliff standard, the data should be structured as follows. 

Version 2.0

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<root>
  <xsd:schema id="root" xmlns="" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    ...
    ...
    <resheader name="version">
	<value>2.0</value>
    </resheader>
    ...
    ...
  <data name="age_question" xml:space="preserve">
    <value>¿Cuantos años tienes?</value>
  </data>
  <data name="name_question" xml:space="preserve">
    <value>¿Cuál es su nombre?</value>
  </data>
</root>

Any resource file (.resx or .resw) that is generated from Visual Studio 2019 or 2022 is recognized. See more on Microsoft reference.


Plural Handling

A resource file can contain plural keys. Eclypse recognizes two types of plural formatting for resource files.


1. ICU Style

Full specifications of ICU message formatting can be found here. However, eclypse supports a limited set of ICU capabilities. This is because only a portion of the ICU message formatting is applicable to the translation context. Your plurals can be encoded in a few different ways.


Supported Variation: 1

Generic
<value>{count, plural, one {Delete item} other {Delete items}}</value>
XML

Supported Variation: 2

Generi
<value>{count, plural, one {Delete {count} item} other {Delete {count} items}}</value>
XML

Supported Variation: 3

<value>Delete {count, plural, one {{count} item} other {{count} items}}</value>
XML


Generic

Supported Variation: 4

<value>Delete {count, number} {count, plural, one {{count} item} other {{count} items}}</value>
XML
Gen

2. JSON style

A Xliff file with JSON plurals looks like this:

<value>{"one": "Delete item", "other": "Delete %d items"}</value>
XML
Generic

Placeholder Pattern

Placeholder pattern depends on which plural handling method you choose. If your Xliff file is encoded with ICU plurals, then you have to use the ICU Placeholder pattern. This is because, ICU Style format specifiers are tightly integrated with the ICU plural handling. On the other hand, if your file is using JSON style to encode the plurals, then you have 2 options for specifying the placeholder pattern.

Printf Style

Printf refers to a control parameter used by a class of functions in the input/output libraries of C and many other programming languages. In the simplest form, your placeholders should be encoded as shown below:

Hello %s! You have %d new messages.
Generic

Read the full list of recognized printf format specifiers here.


Eclypse Style

Eclypse employs a propriety pattern that is similar to printf. This pattern needs to be enclosed in square brackets and can contain a label. The label information is optional; however, if you are planning to export data from eclypse in ICU format, then using labels can make your output more readable. In the simplest form, your placeholders should be encoded as shown below:

Hello [%s]! You have [%d] new messages.
Generic

or optionally including labels:

Hello [%s:person_name]! You have [%d:number_of_messages] new messages.
Generic

Read the full list of recognized printf format specifiers here.