lang changes, new pages, data changes

This commit is contained in:
Henri
2026-02-12 05:27:53 +02:00
parent 1504844f0b
commit 9d13b57d2e
268 changed files with 3310 additions and 1541 deletions

17
src/lib/langHelpers.js Normal file
View File

@@ -0,0 +1,17 @@
// Helper function to get text with fallback to Estonian
export function getLangText(item, key, lang = 'est') {
const value = item[key];
// If it's a simple string, return it
if (typeof value === 'string') {
return value;
}
// If it's an object with language keys
if (value && typeof value === 'object') {
// Try to get the requested language, fallback to Estonian
return value[lang] || value.est || '';
}
return '';
}