From 41ddcc70f6ac27688c0a7dccc975c4b72de718e2 Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Wed, 17 Sep 2025 17:55:54 +0200 Subject: add license --- src/locales.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/locales.cpp') diff --git a/src/locales.cpp b/src/locales.cpp index 89c8499..62bf6fb 100644 --- a/src/locales.cpp +++ b/src/locales.cpp @@ -1,3 +1,19 @@ +/* +* Copyright (c) 2025 Aldrik Ramaekers +* +* Permission to use, copy, modify, and/or distribute this software for any +* purpose with or without fee is hereby granted, provided that the above +* copyright notice and this permission notice appear in all copies. +* +* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +*/ + #include #include @@ -12,6 +28,11 @@ const int locale_map_count = sizeof(locales) / sizeof(locales[0]); locale_map g_locale = locales[0]; // Default to english. +const char* get_locale() +{ + return g_locale.lang_code; +} + void set_locale(const char* key) { for (int i = 0; i < locale_map_count; ++i) { -- cgit v1.2.3-70-g09d2