summaryrefslogtreecommitdiff
path: root/src/locales.cpp
diff options
context:
space:
mode:
authorAldrik Ramaekers <aldrikboy@gmail.com>2025-09-17 17:55:54 +0200
committerAldrik Ramaekers <aldrikboy@gmail.com>2025-09-17 17:55:54 +0200
commit41ddcc70f6ac27688c0a7dccc975c4b72de718e2 (patch)
treefaa8cb49befe057068769a4a08bc0b4ab2a4a882 /src/locales.cpp
parent3a3fac243c013f3d211bb5141e18c82e62deacf9 (diff)
add license
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) {