GetText
From MapbenderWiki
The PostgreSQL function GetText is required by Mapbender. If it is missing your installation (check the function in PostgeSQL, it can also show up in your Mapbender logs) you can create it manually. Simply execute the following code:
CREATE OR REPLACE FUNCTION public.gettext(locale_arg text, string text)
RETURNS character varying AS
$BODY$
DECLARE
msgstr varchar(512);
trl RECORD;
BEGIN
-- RAISE NOTICE '>%<', locale_arg;
SELECT INTO trl * FROM translations
WHERE trim(from locale) = trim(from locale_arg) AND msgid = string;
-- we return the original string, if no translation is found.
-- this is consistent with gettext's behaviour
IF NOT FOUND THEN
RETURN string;
ELSE
RETURN trl.msgstr;
END IF;
END;
$BODY$
LANGUAGE 'plpgsql' VOLATILE;
