stalno u pokretu

< IT & tech

17. 09. 2014. back end * i18n&l10n

Resource file formats

This article is compiled from information in several past articles I published on the Lingohub blog while working for the company. Lingohub specializes in providing app localization for developers and translators.

i18n Resource File Formats: ini files

.ini files are commonly used in applications on various platforms. There is no standard for ini files, and the applications can vary in their use of key-value delimiters, comment masks, comment positions, sections nesting, support for blank lines…


i18n Resource File Formats: properties files

.properties files are commonly used in the Java world (and related platforms, for example they are used for the upcoming FirefoxOS apps). There is no real standard, and various dialects exist. Let’s look at, for example, how properties files comments are handled.


i18n Resource File Formats: iOS .strings files

.strings files are used in the Apple world (e.g. iPhone, iPad, …).


i18n Resource File Formats: YAML files

YAML is a human-readable data serialization format. Its syntax was designed to be easily mapped to data types common to most high-level languages (lists, associative arrays and scalars).

Unlike some other formats, YAML has a well defined standard.

Key features of YAML resource file format:

  • key-value pairs are delimited with colon ( : )
  • values can be surrounded by quotes
  • correct and consistent line indentation is important
  • comments start with a hash sign ( # ), and are ignored by the parser
  • place-holder syntax is: %{name}, where “name” can consist of multiple non-white-space characters


i18n Resource File Formats: RESX and RESW files

RESX files are used by programs developed with Microsoft’s .NET Framework. They store objects and strings for a program in an XML format. They may contain both plain text information as well as binary data, which is encoded as text within the XML tags.

RESW files are used by Microsoft Windows and Silverlight applications and contain strings that are used to localize the application for different languages and contexts. They are often used with XAML applications (such as Expression), which abstract the user interface strings to resource files. Let’s have a closer look at how these files look like in terms of formatting:

Syntax of the RESW and RESX resource file format:

  • documents start with <?xml version=”1.0″ encoding=”ENCODING”?> where ENCODING is desired encoding
  • key-value pairs are nested within a <root> element and have this form:
<data name=”key” xml:space=”preserve”><value>value</value></data>
  • place-holder syntax is: {name}, where “name” can be a combination of non-white-space characters

i18n Resource File Formats: RESJSON files

RESJSON files are used by Windows “Metro” style applications developed for Windows 8. They are saved in a JSON (JavaScript Object Notation) format and contain strings that are often used for localizing the application’s user interface.

Developers often create different RESJSON files (e.g., resources.resjson) in locale folders named /en-US/, /fr-FR/, /ja-JP/, etc. Each resources.resjson file has strings localized for the particular language folder.

The RESJSON resource file formats follow the standard JSON syntax:

  • the whole content is enclosed in braces ( { } ) with no new lines
  • key-value pairs are delimited with colons ( : )
  • keys and values are surrounded by quotes ( ” )
  • key-value pairs are comma separated
  • place-holders syntax: {name}, where “name” can be a combination of non white space characters
  • key-value pairs with key syntax like: “_somekey.comment” where “somekey” is an existing key, are treated as comments belonging to key-value pair with “somekey” key. The location of the comment in the file is not important.

Related posts

17. 09. 2014. back end * i18n&l10n * ruby
i18n gem advanced features – Ruby on Rails internationalization

Using Different Backends for Ruby i18n gem, chaining backends, caching is an i18n gem advanced feature, fallbacks, Translation Metadata, cascading lookups, translation symlinks, using custom exception handlers
[ reading time: ~ 15 min. ]

17. 09. 2014. back end * i18n&l10n * padrino * ruby * sinatra
Internationalization for Ruby – i18n gem

i18n for plain Ruby & the i18n gem, i18n for Ruby on Rails, i18n for Sinatra, i18n for Padrino
[ reading time: ~ 20 min. ]

17. 09. 2014. back end * i18n&l10n * ruby
Internationalization for Ruby with the r18n gem

Installation and setup, translation lookup, filters for translations processing, pluralization, translating activeRecord models and plain Ruby objects, locale settings, r18n wrappers for rails and sinatra, r18n vs i18n
[ reading time: ~ 9 min. ]

17. 09. 2014. back end * cakephp * codeigniter * i18n&l10n * php * symfony * yii * zend
Internationalization How To for the 5 most popular PHP frameworks

In this how-To you will read about using CodeIgniter, CakePHP, Zend, Yii and Symfony
[ reading time: ~ 8 min. ]

17. 09. 2014. back end * fuelphp * i18n&l10n * laravel * php
PHP internationalization frameworks: Laravel and FuelPHP

The article covers two more PHP frameworks that are frequently used, Laravel and FuelPHP
[ reading time: ~ 6 min. ]

17. 09. 2014. back end * i18n&l10n * php
PHP internationalization – i18n mechanisms tutorial

Static web and internationalization, dynamic web applications, localizing strings directly in the code, storing the strings in a relational database, message catalogues (string arrays), JSON, use of resource files
[ reading time: ~ 10 min. ]

17. 09. 2014. back end * gettext * i18n&l10n * php
PHP internationalization with gettext tutorial

Installation, portable object template files, plurals, an example of a PO file, directory structure, machine object files, gettext caching problems, setting up PHP for internationalization with gettext...
[ reading time: ~ 18 min. ]

17. 09. 2014. back end * gettext * i18n&l10n * ruby
Ruby gettext internationalization tutorial on using the fast_gettext gem

Setup, translation lookup, managing translations (MO/PO, db, yaml), rails plugin, pluralization, defaults, multiple repositories, logging...
[ reading time: ~ 9 min. ]

10. 08. 2014. api * back end
Representational state transfer (REST)

[ reading time: ~ 3 min. ]

15. 08. 2014. api * back end * ruby
API - design, implementation, testing

notes and resources
[ reading time: ~ 3 min. ]

01. 09. 2014. api * back end * bdd / tdd * cucumber * ruby * ruby gem
Developing rails REST API with Cucumber

json_spec, writing the definitions, checking the http headers, testing authentication...
[ reading time: ~ 3 min. ]

03. 09. 2014. api * back end * ruby * ruby gem * security
Devise as authentication solution for rails API

Authentication token, the use of sessions, intsallation and setup, configuring the model, the routes, application controller, custom devise controllers, testing the controllers
[ reading time: ~ 9 min. ]

04. 09. 2014. api * back end
Design principles of the REST-ful JSON API (HATEOAS)

REST, JSON, API, HATEOAS, media types, top level resource representations, url templates, compound documents, urls, responses, errors, JSend response types, HTTP Status codes
[ reading time: ~ 12 min. ]

07. 09. 2014. api * back end * ruby
Building a JSON API in rails

[ reading time: ~ 1 min. ]

12. 09. 2014. back end * ruby
ActiveRecord notes

Uniqueness on a combination of fields, inclusion in array, getting all model associations, overriding model getters and setters, serialization...
[ reading time: ~ 2 min. ]

22. 11. 2014. back end * deployment * ruby
rails deployment

Setting up Debian 7 server on VPS, nginx, php-fpm, ruby, unicorn/phusion passanger, essentials, ssh keys, capistrano...
[ reading time: ~ 2 min. ]

24. 11. 2014. back end * dev_tool
nginx notes

[ reading time: ~ 1 min. ]

10. 12. 2014. back end * ruby gem

[ reading time: ~ 1 min. ]

Ovaj sajt ne sadrži first party kukije i druge mehanizme za aktivno praćenje poseta/ponašanja (facebook, google analytics, itd...). Na nekim stranicama se nalaze embedovani youtube video klipovi i google mape koji učitavaju svoje kukije.