307 lines
18 KiB
PHP
307 lines
18 KiB
PHP
<?php
|
|
// Function to get the current language
|
|
function get_current_language() {
|
|
if (isset($_SESSION['lang']) && array_key_exists($_SESSION['lang'], get_translations())) {
|
|
return $_SESSION['lang'];
|
|
}
|
|
return 'en'; // Default language
|
|
}
|
|
|
|
// Function to translate a key
|
|
function t($key) {
|
|
$translations = get_translations();
|
|
$lang = get_current_language();
|
|
return $translations[$lang][$key] ?? $key;
|
|
}
|
|
|
|
function get_translations() {
|
|
return [
|
|
'en' => [
|
|
'app_name' => 'AI Content Generator',
|
|
'nav_generator' => 'Generator',
|
|
'nav_pricing' => 'Pricing',
|
|
'nav_faq' => 'FAQ',
|
|
'nav_terms' => 'Terms',
|
|
'nav_history' => 'History',
|
|
'nav_profile' => 'Profile',
|
|
'nav_logout' => 'Logout',
|
|
'nav_register' => 'Register',
|
|
'nav_login' => 'Login',
|
|
'admin_panel_title' => 'Admin Panel',
|
|
'auth_form_title' => 'Login to your account',
|
|
'auth_form_email' => 'Email',
|
|
'auth_form_password' => 'Password',
|
|
'auth_form_submit' => 'Login',
|
|
'auth_form_no_account' => "Don\'t have an account?",
|
|
'auth_form_register_link' => 'Register here',
|
|
'registration_form_title' => 'Create a new account',
|
|
'registration_form_username' => 'Username',
|
|
'registration_form_email' => 'Email',
|
|
'registration_form_password' => 'Password',
|
|
'registration_form_password_confirm' => 'Confirm Password',
|
|
'registration_form_submit' => 'Register',
|
|
'registration_form_has_account' => 'Already have an account?',
|
|
'registration_form_login_link' => 'Login here',
|
|
'password_reset_title' => 'Reset Password',
|
|
'password_reset_email' => 'Email',
|
|
'password_reset_submit' => 'Send Password Reset Link',
|
|
'password_reset_return_to_login' => 'Return to Login',
|
|
'profile_title' => 'Profile',
|
|
'profile_username' => 'Username',
|
|
'profile_email' => 'Email',
|
|
'profile_created_at' => 'Registration Date',
|
|
'profile_credits' => 'Credits',
|
|
'profile_subscription_status' => 'Subscription Status',
|
|
'profile_subscription_none' => 'None',
|
|
'profile_subscription_active' => 'Active',
|
|
'profile_subscription_expires' => 'Expires on',
|
|
'profile_manage_subscription_btn' => 'Manage Subscription',
|
|
'pricing_title' => 'Choose Your Plan',
|
|
'pricing_subtitle' => 'Unlock premium features and get more credits.',
|
|
'pricing_free_title' => 'Free',
|
|
'pricing_free_price' => '$0 / month',
|
|
'pricing_free_feature_1' => '10 credits',
|
|
'pricing_free_feature_2' => 'Basic content generation',
|
|
'pricing_free_feature_3' => 'Access to history',
|
|
'pricing_free_btn' => 'Current Plan',
|
|
'pricing_pro_title' => 'Pro',
|
|
'pricing_pro_price' => '$10 / month',
|
|
'pricing_pro_feature_1' => '100 credits per month',
|
|
'pricing_pro_feature_2' => 'Advanced content generation',
|
|
'pricing_pro_feature_3' => 'Priority support',
|
|
'pricing_pro_btn' => 'Subscribe',
|
|
'faq_title' => 'Frequently Asked Questions',
|
|
'faq_q1_title' => 'What is AI Content Generator?',
|
|
'faq_q1_text' => 'It is a tool that uses artificial intelligence to generate content for various purposes.',
|
|
'faq_q2_title' => 'How do credits work?',
|
|
'faq_q2_text' => 'Each generation consumes a certain amount of credits. You can get more by subscribing.',
|
|
'faq_q3_title' => 'Can I use the generated content for commercial purposes?',
|
|
'faq_q3_text' => 'Yes, you can use the generated content for any purpose, including commercial projects.',
|
|
'faq_q4_title' => 'What languages are supported?',
|
|
'faq_q4_text' => 'Currently, we support English and Polish. More languages will be added in the future.',
|
|
|
|
'terms_title' => 'Terms of Service',
|
|
'terms_last_updated' => 'Last Updated: 2025-11-13',
|
|
'terms_section1_title' => 'Acceptance of Terms',
|
|
'terms_section1_text' => 'By accessing and using our service, you accept and agree to be bound by the terms and provision of this agreement.',
|
|
'terms_section2_title' => 'Service Description',
|
|
'terms_section2_text' => 'Our service provides AI-generated content based on user inputs. The service is provided "as is" without any warranties.',
|
|
'terms_section3_title' => 'User Conduct',
|
|
'terms_section3_text' => 'You agree not to use the service for any unlawful purpose or any purpose prohibited under this clause.',
|
|
'terms_section4_title' => 'Intellectual Property',
|
|
'terms_section4_text' => 'The Service and its original content, features, and functionality are and will remain the exclusive property of the service provider.',
|
|
'terms_section5_title' => 'Termination',
|
|
'terms_section5_text' => 'We may terminate or suspend your access to our service immediately, without prior notice or liability, for any reason whatsoever.',
|
|
'history_title' => 'Generation History',
|
|
'history_no_generations' => 'You have no generations yet.',
|
|
'generation_placeholder' => 'Enter your topic or keywords here...',
|
|
'generation_btn' => 'Generate',
|
|
'error_title' => 'Error',
|
|
'error_message' => 'An unexpected error occurred.',
|
|
'insufficient_credits_error' => 'Insufficient credits to proceed with the operation',
|
|
'subscription_expired_error' => 'Your subscription has expired.',
|
|
'generation_limit_exceeded_error' => 'You have exceeded your generation limit for today.',
|
|
'login_to_generate_error' => 'You need to be logged in to generate content.',
|
|
'create_account' => 'Create a new account',
|
|
'register_subtitle' => 'Join our platform to start generating content.',
|
|
'email' => 'Email',
|
|
'password' => 'Password',
|
|
'register_button' => 'Register',
|
|
'already_have_account' => 'Already have an account?',
|
|
'login_link' => 'Login here',
|
|
'fill_all_fields' => 'Please fill in all fields.',
|
|
'invalid_email' => 'Invalid email format.',
|
|
'email_already_registered' => 'This email is already registered.',
|
|
'registration_successful' => 'Registration successful!',
|
|
'login_now' => 'Login now',
|
|
'passwords_do_not_match' => 'Passwords do not match.',
|
|
'hero_title' => 'Create Unique Descriptions in Seconds',
|
|
'hero_subtitle' => 'Our AI will help you create engaging content for your products.',
|
|
'hero_cta' => 'Try it now',
|
|
'generator_form_title' => 'Generate a Description',
|
|
'upload_label' => 'Upload Photos',
|
|
'state_label' => 'State',
|
|
'state_new' => 'New',
|
|
'state_used' => 'Used',
|
|
'state_visibly_used' => 'Visibly Used',
|
|
'material_label' => 'Material',
|
|
'brand_label' => 'Brand',
|
|
'size_label' => 'Size',
|
|
'length_label' => 'Length (cm)',
|
|
'width_chest_label' => 'Chest Width (cm)',
|
|
'width_waist_label' => 'Waist Width (cm)',
|
|
'width_hips_label' => 'Hips Width (cm)',
|
|
'additional_info_label' => 'Additional Info',
|
|
'additional_info_placeholder' => 'e.g., any defects, special features',
|
|
'generate_button' => 'Generate',
|
|
'how_it_works_title' => 'How It Works',
|
|
'step1_title' => 'Upload Photos',
|
|
'step1_desc' => 'Add images of your product.',
|
|
'step2_title' => 'Add Details',
|
|
'step2_desc' => 'Provide some basic information.',
|
|
'step3_title' => 'Generate Content',
|
|
'step3_desc' => 'Let our AI do the magic.',
|
|
'basic_plan_name' => 'Basic',
|
|
'premium_plan_name' => 'Premium',
|
|
'basic_plan_limit' => 'Up to 150 generations per month',
|
|
'premium_plan_limit' => 'Unlimited generations',
|
|
'feature_150_generations' => '150 generations',
|
|
'feature_standard_support' => 'Standard support',
|
|
'feature_history_access' => 'Access to generation history',
|
|
'feature_unlimited_generations' => 'Unlimited generations',
|
|
'feature_priority_support' => 'Priority support',
|
|
'monthly' => 'Monthly',
|
|
'annually' => 'Annually',
|
|
'save_15_percent' => 'Save 15%',
|
|
'month_short' => 'mo',
|
|
'billed_annually_at' => 'Billed annually at',
|
|
'choose_plan' => 'Choose Plan',
|
|
'pricing_footer_text' => 'Prices are in USD. You can cancel at any time.',
|
|
'history_empty' => 'You have no generation history yet. Create your first one!',
|
|
'history_generate_now' => 'Generate Now',
|
|
],
|
|
'pl' => [
|
|
'app_name' => 'Generator Treści AI',
|
|
'nav_generator' => 'Generator',
|
|
'nav_pricing' => 'Cennik',
|
|
'nav_faq' => 'FAQ',
|
|
'nav_terms' => 'Regulamin',
|
|
'nav_history' => 'Historia',
|
|
'nav_profile' => 'Profil',
|
|
'nav_logout' => 'Wyloguj',
|
|
'nav_register' => 'Rejestracja',
|
|
'nav_login' => 'Login',
|
|
'admin_panel_title' => 'Panel administratora',
|
|
'auth_form_title' => 'Zaloguj się na swoje konto',
|
|
'auth_form_email' => 'Email',
|
|
'auth_form_password' => 'Hasło',
|
|
'auth_form_submit' => 'Zaloguj',
|
|
'auth_form_no_account' => "Nie masz konta?",
|
|
'auth_form_register_link' => 'Zarejestruj się tutaj',
|
|
'registration_form_title' => 'Utwórz nowe konto',
|
|
'registration_form_username' => 'Nazwa użytkownika',
|
|
'registration_form_email' => 'Email',
|
|
'registration_form_password' => 'Hasło',
|
|
'registration_form_password_confirm' => 'Potwierdź hasło',
|
|
'registration_form_submit' => 'Zarejestruj',
|
|
'registration_form_has_account' => 'Masz już konto?',
|
|
'registration_form_login_link' => 'Zaloguj się tutaj',
|
|
'password_reset_title' => 'Resetuj hasło',
|
|
'password_reset_email' => 'Email',
|
|
'password_reset_submit' => 'Wyślij link do resetowania hasła',
|
|
'password_reset_return_to_login' => 'Wróć do logowania',
|
|
'profile_title' => 'Profil',
|
|
'profile_username' => 'Nazwa użytkownika',
|
|
'profile_email' => 'Email',
|
|
'profile_created_at' => 'Data rejestracji',
|
|
'profile_credits' => 'Kredyty',
|
|
'profile_subscription_status' => 'Status subskrypcji',
|
|
'profile_subscription_none' => 'Brak',
|
|
'profile_subscription_active' => 'Aktywna',
|
|
'profile_subscription_expires' => 'Wygasa dnia',
|
|
'profile_manage_subscription_btn' => 'Zarządzaj subskrypcją',
|
|
'pricing_title' => 'Wybierz swój plan',
|
|
'pricing_subtitle' => 'Odblokuj funkcje premium i zdobądź więcej kredytów.',
|
|
'pricing_free_title' => 'Darmowy',
|
|
'pricing_free_price' => '0 zł / miesiąc',
|
|
'pricing_free_feature_1' => '10 kredytów',
|
|
'pricing_free_feature_2' => 'Podstawowe generowanie treści',
|
|
'pricing_free_feature_3' => 'Dostęp do historii',
|
|
'pricing_free_btn' => 'Obecny plan',
|
|
'pricing_pro_title' => 'Pro',
|
|
'pricing_pro_price' => '40 zł / miesiąc',
|
|
'pricing_pro_feature_1' => '100 kredytów miesięcznie',
|
|
'pricing_pro_feature_2' => 'Zaawansowane generowanie treści',
|
|
'pricing_pro_feature_3' => 'Priorytetowe wsparcie',
|
|
'pricing_pro_btn' => 'Subskrybuj',
|
|
'faq_title' => 'Najczęściej zadawane pytania',
|
|
'faq_q1_title' => 'Czym jest Generator Treści AI?',
|
|
'faq_q1_text' => 'Jest to narzędzie, które wykorzystuje sztuczną inteligencję do generowania treści w różnych celach.',
|
|
'faq_q2_title' => 'Jak działają kredyty?',
|
|
'faq_q2_text' => 'Każde generowanie zużywa określoną ilość kredytów. Możesz uzyskać więcej, subskrybując.',
|
|
'faq_q3_title' => 'Czy mogę używać wygenerowanych treści w celach komercyjnych?',
|
|
'faq_q3_text' => 'Tak, możesz używać wygenerowanych treści w dowolnym celu, w tym w projektach komercyjnych.',
|
|
'faq_q4_title' => 'Jakie języki są obsługiwane?',
|
|
'faq_q4_text' => 'Obecnie obsługujemy język angielski i polski. W przyszłości zostanie dodanych więcej języków.',
|
|
'terms_title' => 'Regulamin usługi',
|
|
'terms_last_updated' => 'Ostatnia aktualizacja: 2025-11-13',
|
|
'terms_section1_title' => 'Akceptacja warunków',
|
|
'terms_section1_text' => 'Korzystając z naszej usługi, akceptujesz i zgadzasz się na przestrzeganie warunków niniejszej umowy.',
|
|
'terms_section2_title' => 'Opis usługi',
|
|
'terms_section2_text' => 'Nasza usługa dostarcza treści generowane przez sztuczną inteligencję na podstawie danych wprowadzonych przez użytkownika. Usługa jest świadczona w stanie, w jakim się znajduje, bez żadnych gwarancji.',
|
|
'terms_section3_title' => 'Postępowanie użytkownika',
|
|
'terms_section3_text' => 'Zgadzasz się nie używać usługi w żadnym celu niezgodnym z prawem lub zabronionym na mocy niniejszej klauzuli.',
|
|
'terms_section4_title' => 'Własność intelektualna',
|
|
'terms_section4_text' => 'Usługa i jej oryginalna treść, funkcje i funkcjonalność są i pozostaną wyłączną własnością dostawcy usługi.',
|
|
'terms_section5_title' => 'Zakończenie świadczenia usług',
|
|
'terms_section5_text' => 'Możemy natychmiast zakończyć lub zawiesić Twój dostęp do naszej usługi, bez wcześniejszego powiadomienia lub odpowiedzialności, z dowolnego powodu.',
|
|
'history_title' => 'Historia generowania',
|
|
'history_no_generations' => 'Nie masz jeszcze żadnych generacji.',
|
|
'generation_placeholder' => 'Wpisz tutaj swój temat lub słowa kluczowe...',
|
|
'generation_btn' => 'Generuj',
|
|
'error_title' => 'Błąd',
|
|
'error_message' => 'Wystąpił nieoczekiwany błąd.',
|
|
'insufficient_credits_error' => 'Niewystarczająca ilość kredytów, aby kontynuować operację',
|
|
'subscription_expired_error' => 'Twoja subskrypcja wygasła.',
|
|
'generation_limit_exceeded_error' => 'Przekroczyłeś limit generowania na dziś.',
|
|
'login_to_generate_error' => 'Musisz być zalogowany, aby generować treści.',
|
|
'create_account' => 'Utwórz nowe konto',
|
|
'register_subtitle' => 'Dołącz do naszej platformy, aby zacząć generować treści.',
|
|
'email' => 'Email',
|
|
'password' => 'Hasło',
|
|
'register_button' => 'Zarejestruj',
|
|
'already_have_account' => 'Masz już konto?',
|
|
'login_link' => 'Zaloguj się tutaj',
|
|
'fill_all_fields' => 'Proszę wypełnić wszystkie pola.',
|
|
'invalid_email' => 'Nieprawidłowy format email.',
|
|
'email_already_registered' => 'Ten email jest już zarejestrowany.',
|
|
'registration_successful' => 'Rejestracja udana!',
|
|
'login_now' => 'Zaloguj się teraz',
|
|
'passwords_do_not_match' => 'Hasła nie pasują do siebie.',
|
|
'hero_title' => 'Twórz unikalne opisy w kilka sekund',
|
|
'hero_subtitle' => 'Nasza SI pomoże Ci stworzyć angażujące treści dla Twoich produktów.',
|
|
'hero_cta' => 'Wypróbuj teraz',
|
|
'generator_form_title' => 'Wygeneruj opis',
|
|
'upload_label' => 'Wgraj zdjęcia',
|
|
'state_label' => 'Stan',
|
|
'state_new' => 'Nowy',
|
|
'state_used' => 'Używany',
|
|
'state_visibly_used' => 'Widoczne ślady użytkowania',
|
|
'material_label' => 'Materiał',
|
|
'brand_label' => 'Marka',
|
|
'size_label' => 'Rozmiar',
|
|
'length_label' => 'Długość (cm)',
|
|
'width_chest_label' => 'Szerokość w klatce (cm)',
|
|
'width_waist_label' => 'Szerokość w pasie (cm)',
|
|
'width_hips_label' => 'Szerokość w biodrach (cm)',
|
|
'additional_info_label' => 'Dodatkowe informacje',
|
|
'additional_info_placeholder' => 'np. wady, cechy szczególne',
|
|
'generate_button' => 'Generuj',
|
|
'how_it_works_title' => 'Jak to działa',
|
|
'step1_title' => 'Wgraj zdjęcia',
|
|
'step1_desc' => 'Dodaj zdjęcia swojego produktu.',
|
|
'step2_title' => 'Dodaj szczegóły',
|
|
'step2_desc' => 'Podaj kilka podstawowych informacji.',
|
|
'step3_title' => 'Generuj treść',
|
|
'step3_desc' => 'Pozwól naszej SI działać.',
|
|
'basic_plan_name' => 'Podstawowy',
|
|
'premium_plan_name' => 'Premium',
|
|
'basic_plan_limit' => 'Do 150 generacji miesięcznie',
|
|
'premium_plan_limit' => 'Nielimitowane generacje',
|
|
'feature_150_generations' => '150 generacji',
|
|
'feature_standard_support' => 'Standardowe wsparcie',
|
|
'feature_history_access' => 'Dostęp do historii generacji',
|
|
'feature_unlimited_generations' => 'Nielimitowane generacje',
|
|
'feature_priority_support' => 'Priorytetowe wsparcie',
|
|
'monthly' => 'Miesięcznie',
|
|
'annually' => 'Rocznie',
|
|
'save_15_percent' => 'Zaoszczędź 15%',
|
|
'month_short' => 'mc',
|
|
'billed_annually_at' => 'Płatne rocznie w kwocie',
|
|
'choose_plan' => 'Wybierz plan',
|
|
'pricing_footer_text' => 'Ceny podane są w USD. Możesz anulować w dowolnym momencie.',
|
|
'history_empty' => 'Nie masz jeszcze historii generacji. Utwórz swoją pierwszą!',
|
|
'history_generate_now' => 'Generuj teraz',
|
|
],
|
|
];
|
|
} |