# Aros/Developer/Docs/Libraries/Locale

* Navbar for the Aros wikibook
* Aros User
* Aros User Docs
* Aros User FAQs
* Aros User Applications
* Aros User DOS Shell
* Aros/User/AmigaLegacy
* Aros Dev Docs
* Aros Developer Docs
* Porting Software from AmigaOS/SDL
* For Zune Beginners
* Zune .MUI Classes
* For SDL Beginners
* Aros Developer BuildSystem
* Specific platforms
* Aros x86 Complete System HCL
* Aros x86 Audio/Video Support
* Aros x86 Network Support
* Aros Intel AMD x86 Installing
* Aros Storage Support IDE SATA etc
* Aros Poseidon USB Support
* x86-64 Support
* Motorola 68k Amiga Support
* Linux and FreeBSD Support
* Windows Mingw and MacOSX Support
* Android Support
* Arm Raspberry Pi Support
* PPC Power Architecture
* misc
* Aros Public License

## Introduction

here is a global environment variable (Language) that holds the current active language.
You can check this yourself by typing "getenv language" (without the quotes) into a shell. Or it can be used in a script as variable $Language.
It can also be done programming using the OpenLocale function (with NULL as parameter to return the current locale information in struct Locale)

### System

The locale.library provides us tools to localize applications. Localized strings are stored in separate languages catalogs files, under Catalogs directories. AROS Development Environment macros can build the required files. This document gives you a work-flow to localize applications or localize existing applications or create catalogs files for existing localized applications.
For each language supported, the system has a LOCALE:Languages/ file:
System translations are in LOCALE:Catalogs/ language directories:
Each application needs its proper Catalogs directory:
Translation files are in languages directories:

### Appplications

Each application supporting localization has its own catalogs directory:
Strings are initially stored in a catalog description file:
Translations are stored in catalog translation files:
Structured as:
The catalogs build file
Localization is provided by:
Application: _(MSG_MY_TITLE)
As STRPTR.
Or with: __(MSG_MY_MESSAGE)
As IPTR (1) The application source file
In AROS/Contrib/my_app/my_app.c, initialize locale with:
Use the strings names from the .cd file. For instance, on a Zune application: MUIA_Application_Title, __(MSG_TITLE), ... } The application build file

### Build System

AROS Metamake builds required files with its build file present as:

## FlexCat

FlexCat is a tool to create Amiga localization catalogs, as well as source and header files, out of catalog descriptions.
The version in AROS/tools is 2.4, with a developers.readme saying to treat it as freeware with source code, but not to fork it. The history file tells us that version 2.4 is from 28 November 1999. Not all websites referred to in the documentation still exist, but flexcat indeed supports the 2.4 version, with no mention of further development. Is a port a fork? If not, does a former port become a fork e.g. just because AROS becomes 68k? What if there originally was only one port, but someone else does another one - who is the forker? Maybe the author was just too imprecise and should have provided a definition of fork...
1 The AROS project stamps are for 7 March 2009, so there may well have been changes for the AROS version over the last decade.
2 The last release on Aminet is version 2.7 on 29 June 2010, by the project, which claims a copyright starting in 2002.
The original homepage is outdated. It's now a GPL licensed product which is maintained here. Of course the 2.7 distribution does not contain the source code, because the project is Open Source and the source code is available for everybody. The release archives contain binaries only for all supported platforms.
* Update the sources in AROS from a stable release of FlexCat
* Make it buildable again, perhaps my merging in commits from prior commits.
* C_h_orig.sd is no longer available in current FlexCat. Find a replacement which works with the AROS build-system.
* Bring back all fixes for AROS to the current trunk of FlexCat. Either bei joining the project on Sourceforge or sending it to the maintainer.
We would appreciate if you would join the team and commit the changes to the SVN repository on sourceforge.net. Just ask Jens Langer (damato#light-speed.de) to add you the list of developers.
Optionally: wait till the "vendor" branch is available in AROS repository and work with that.