Difference between revisions of "Supported Resource Bundles"

From Lingoport Wiki
Jump to: navigation, search
(What resource bundle types are supported by LRM?)
(What resource bundle types are supported by LRM?)
Line 7: Line 7:
<li>.rjs (for JavaScript)</li>
<li>.rjs (for JavaScript)</li>
<li>.rxml (for xml)</li>
<li>.rxml (for xml)</li>
<li>.rc (Delphi, ...)</li>
<li>.rc (Windows C++, Delphi, ...)</li>
<li>.msg (C, C++, ...)</li>
<li>.msg (C, C++, ...)</li>
<li>.strings (Mobile iOS)</li>
<li>.strings (Mobile iOS)</li>

Revision as of 15:34, 6 July 2015

What resource bundle types are supported by LRM?

Currently Version 2.0 of the Resource Manager supports the following file types:

  • .properties files (for instance, Java-type resources)
  • .resx files (used in the .Net world)
  • .po files
  • .rjs (for JavaScript)
  • .rxml (for xml)
  • .rc (Windows C++, Delphi, ...)
  • .msg (C, C++, ...)
  • .strings (Mobile iOS)
  • strings.xml (Android)

How to setup LRM for .properties

The encoding of a .properties file is ISO-8859-1, also known as Latin-1. All non-Latin-1 characters must be entered by using Unicode escape characters, e. g. \uHHHH where HHHH is a hexadecimal index of the character in the Unicode character set. This allows for using .properties files as resource bundles for localization. A non-Latin-1 text file can be converted to a correct .properties file by using the native2ascii tool that is shipped with the JDK or by using a tool, such as po2prop, that manages the transformation from a bilingual localization format into .properties escaping. For more information, please refer to : http://en.wikipedia.org/wiki/.properties

Resource Manager Configuration

Typical .xml definition for projects with .properties files.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
  <project-desc>This is a sample LRM Project definition file, configured to support Java properties files</project-desc>
  <!--group-name contains either the company name or the group name-->
    <!--If set to '0' (false), then the 'missed translation' error will not be triggered-->
      <!--If the base resource files use the file-name-pattern in their name -->
      <!--then set use-pattern-on-dflt-locale to 1, if not then set to 0-->
      <!--Default pattern for properties is '![CDATA[\{\d+\}|%[ds]]]'-->

What is resx files encoding?

.Net resx files must be UTF-8 encoded, as per the resx schema, Hence, on-boarding resx resource bundles with LRM must specify the UTF-8 encoding:


<?xml version="1.0" encoding="utf-8"?>
    <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
<xsd:element name="data">
                <xsd:element name="value" type="xsd:string" minOccurs="0"
                    msdata:Ordinal="2" />
                <xsd:attribute name="name" type="xsd:string" />
                <xsd:attribute name="type" type="xsd:string" />
                <xsd:attribute name="mimetype" type="xsd:string" />

Why don't Bad iOS Comments Trigger Errors?

If an IOS file has a comment that is not ended properly, no error is thrown. For example, if a comment doesn't have an ending */, such as /*Bad comment no errors are found.

This is due to the formatting of iOS. This type of bad comments would typically be created on the base files.

Note key/value pairs are not effected. Noticed when LRM_RESEND tag was added, the info in the Changed Key values included LRM_RESEND.