summaryrefslogtreecommitdiff
path: root/src/locales.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/locales.cpp')
-rw-r--r--src/locales.cpp21
1 files changed, 21 insertions, 0 deletions
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 <aldrik.ramaekers@gmail.com>
+*
+* 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 <stdio.h>
#include <string.h>
@@ -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) {