Skip to content

Latest commit

 

History

History
 
 

icutranslit

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
osml10n_translit is a simple Any to Latin transliteration glue code
function for postgresql using icu transliterator:

http://www.icu-project.org/apiref/icu4c/classicu_1_1Transliterator.html

We currently use this code for localisation of the German Mapnik
style. Transliteration is the last resort if no latin name:de, int_name
or name:en has been found by the osml10n_get_name PL/pgSQL
function.

To enable the tranliterate function in your database execute the
following code as database root user:

CREATE FUNCTION osml10n_translit(text) RETURNS text AS '$libdir/osml10n_translit.so', 'osml10n_translit' LANGUAGE C STRICT;

Afterwards the function can then be used like this:

mydb=>  select osml10n_translit('Москва́');
 osml10n_translit
---------------
 Moskvá
(1 row)