38682-vm/includes/lang.php
2026-02-24 17:40:17 +00:00

115 lines
4.2 KiB
PHP

<?php
// Simple translation helper
function t($key, $lang = null) {
// User requested "No translations in all app" except for specific areas
// which are handled independently (qorder, rate).
// So we force 'en' here for all general UI labels.
$lang = 'en';
$translations = [
'en' => [
'dashboard' => 'Dashboard',
'pos_operations' => 'POS & Operations',
'pos_terminal' => 'POS Terminal',
'orders_pos' => 'Orders',
'kitchen_view' => 'Kitchen',
'waiter_view' => 'Waiter',
'ads_management' => 'Ads Management',
'menu_management' => 'Menu Management',
'products' => 'Products',
'categories' => 'Categories',
'restaurant_setup' => 'Restaurant Setup',
'outlets' => 'Outlets',
'areas' => 'Areas',
'tables' => 'Tables',
'people_partners' => 'People & Partners',
'customers' => 'Customers',
'suppliers' => 'Suppliers',
'loyalty' => 'Loyalty',
'financials' => 'Financials',
'purchases' => 'Purchases',
'expenses' => 'Expenses',
'expense_categories' => 'Expense Categories',
'reports_analytics' => 'Reports & Analytics',
'daily_reports' => 'Daily Reports',
'user_management' => 'User Management',
'users' => 'Users',
'roles_groups' => 'Roles / Groups',
'attendance' => 'Attendance',
'staff_ratings' => 'Staff Ratings',
'settings' => 'Settings',
'payment_types' => 'Payment Types',
'integrations' => 'Integrations',
'company' => 'Company',
'backup_restore' => 'Backup & Restore',
'view_site' => 'View Site',
'theme' => 'Theme',
'language' => 'Language',
'logout' => 'Logout',
'my_profile' => 'My Profile',
'company_settings' => 'Company Settings',
'signed_in_as' => 'Signed in as',
'welcome_back' => 'Welcome back',
'select_theme' => 'Select Theme',
'select_language' => 'Select Language',
'default' => 'Default',
'dark' => 'Dark',
'ocean' => 'Ocean',
'forest' => 'Forest',
'grape' => 'Grape',
'english' => 'English',
'arabic' => 'Arabic',
'search' => 'Search',
'filter' => 'Filter',
'add' => 'Add',
'edit' => 'Edit',
'delete' => 'Delete',
'save' => 'Save',
'cancel' => 'Cancel',
'close' => 'Close',
'actions' => 'Actions',
'name' => 'Name',
'arabic_name' => 'Arabic Name',
'description' => 'Description',
'status' => 'Status',
'active' => 'Active',
'inactive' => 'Inactive',
'all' => 'All',
'none' => 'None',
'price' => 'Price',
'quantity' => 'Quantity',
'total' => 'Total',
'date' => 'Date',
'customer' => 'Customer',
'phone' => 'Phone',
'email' => 'Email',
'address' => 'Address',
'points' => 'Points',
'stock' => 'Stock',
'category' => 'Category',
'variant' => 'Variant',
'table' => 'Table',
'outlet' => 'Outlet',
'order_no' => 'Order No',
'payment' => 'Payment',
'type' => 'Type',
'commission' => 'Commission',
'preparing' => 'Preparing',
'ready' => 'Ready',
'completed' => 'Completed',
'cancelled' => 'Cancelled',
'takeaway' => 'Takeaway',
'dine_in' => 'Dine-In',
'delivery' => 'Delivery',
'auto_translate' => 'Auto-translate',
'quick_pay' => 'QUICK PAY',
'save_bill' => 'SAVE BILL',
'recall' => 'Recall Bill',
'orders' => 'Orders',
'kitchen' => 'Kitchen',
'switch' => 'Switch',
]
];
return $translations['en'][$key] ?? $key;
}