locale-util.h revision a34286684ebb78dd3db0d7f34feb2c121c9d00cc
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering#pragma once
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering/***
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering This file is part of systemd.
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering Copyright 2014 Lennart Poettering
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering systemd is free software; you can redistribute it and/or modify it
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering under the terms of the GNU Lesser General Public License as published by
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering the Free Software Foundation; either version 2.1 of the License, or
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering (at your option) any later version.
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering systemd is distributed in the hope that it will be useful, but
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering WITHOUT ANY WARRANTY; without even the implied warranty of
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering Lesser General Public License for more details.
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering You should have received a copy of the GNU Lesser General Public License
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering along with systemd; If not, see <http://www.gnu.org/licenses/>.
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering***/
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poetteringtypedef enum LocaleVariable {
3f6fd1ba65f962702753c4ad284b588e59689a23Lennart Poettering /* We don't list LC_ALL here on purpose. People should be
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering * using LANG instead. */
25300b5a1fcf54674a69d0f4ab08925be00b0227Lennart Poettering
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering VARIABLE_LANG,
3f6fd1ba65f962702753c4ad284b588e59689a23Lennart Poettering VARIABLE_LANGUAGE,
3f6fd1ba65f962702753c4ad284b588e59689a23Lennart Poettering VARIABLE_LC_CTYPE,
3f6fd1ba65f962702753c4ad284b588e59689a23Lennart Poettering VARIABLE_LC_NUMERIC,
3f6fd1ba65f962702753c4ad284b588e59689a23Lennart Poettering VARIABLE_LC_TIME,
07630cea1f3a845c09309f197ac7c4f11edd3b62Lennart Poettering VARIABLE_LC_COLLATE,
3f6fd1ba65f962702753c4ad284b588e59689a23Lennart Poettering VARIABLE_LC_MONETARY,
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering VARIABLE_LC_MESSAGES,
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering VARIABLE_LC_PAPER,
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering VARIABLE_LC_NAME,
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering VARIABLE_LC_ADDRESS,
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering VARIABLE_LC_TELEPHONE,
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering VARIABLE_LC_MEASUREMENT,
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering VARIABLE_LC_IDENTIFICATION,
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering _VARIABLE_LC_MAX,
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering _VARIABLE_LC_INVALID = -1
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering} LocaleVariable;
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poetteringint get_locales(char ***l);
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poetteringbool locale_is_valid(const char *name);
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poetteringconst char* locale_variable_to_string(LocaleVariable i) _const_;
b6e676ce41508e2aeea22202fc8f234126177f52Lennart PoetteringLocaleVariable locale_variable_from_string(const char *s) _pure_;
b6e676ce41508e2aeea22202fc8f234126177f52Lennart Poettering