translations = {
    'en': {
        'login': 'Login',
        'register': 'Register',
        'forgot_password': 'Forgot Password?',
        'email': 'Email',
        'password': 'Password',
        'remember_me': 'Remember Me (7 days)',
        'sign_in': 'Sign In',
        'username': 'Username',
        'repeat_password': 'Repeat Password',
        'reset_password': 'Reset Password',
        'submit': 'Submit',
        'welcome': 'Welcome to Study Platform',
        'welcome_back': 'Welcome back, please log in to your account',
        'switch_language': 'Switch Language',
        'switch_theme': 'Switch Theme',
        'logout': 'Logout',
        'my_dashboard': 'My Dashboard',
        'network_drive': 'Network Drive',
        'email_system': 'Email System',
        'code_compiler': 'Code Compiler',
        'file_submission': 'File Submission',
        'video_platform': 'Video Platform',
        'blog_space': 'Blog Space',
        'ai_platform': 'AI Platform',
        'code_repository': 'Code Repository',
        'password_reset_sent': 'Check your email for password reset instructions',
        'invalid_reset_token': 'Invalid or expired token',
        'password_reset_success': 'Your password has been reset',
        'account_created': 'Account created successfully! You can now log in',
        'login_success': 'Login successful',
        'account_login': 'Account Login',
        'qr_login': 'QR Code Login',
        'email_placeholder': 'Please enter your email',
        'password_placeholder': 'Please enter your password',
        'other_login_methods': 'Other Login Methods',
        'wechat_login': 'WeChat Login',
        'qq_login': 'QQ Login',
        'scan_qr_code': 'Please scan the QR code to log in',
        'email_required': 'Email is required',
        'invalid_email': 'Invalid email format',
        'password_required': 'Password is required',
        'password_too_short': 'Password must be at least 8 characters',
        'no_account': 'Don\'t have an account?',
        'privacy_policy': 'Privacy Policy',
        'terms_of_service': 'Terms of Service',
        'verification_code': 'Verification Code',
        'send_verification_code': 'Send Verification Code',
        'verification_code_sent': 'Verification code has been sent to your email',
        'email_send_failed': 'Failed to send email, please try again later',
        'email_already_registered': 'This email is already registered',
        'resend_code': 'Resend Code',
        'email_verification': 'Email Verification',
        'next_step': 'Next Step',
        'back': 'Back',
        'account_info': 'Account Information',
        'registration_success': 'Registration Successful',
        'verification_code_invalid': 'Invalid verification code',
        'verification_code_expired': 'Verification code has expired'
    },
    'zh': {
        'verification_code': '验证码',
        'send_verification_code': '发送验证码',
        'verification_code_sent': '验证码已发送到您的邮箱',
        'email_send_failed': '邮件发送失败，请稍后重试',
        'email_already_registered': '该邮箱已被注册',
        'resend_code': '重新发送',
        'email_verification': '邮箱验证',
        'next_step': '下一步',
        'back': '返回',
        'account_info': '账号信息',
        'registration_success': '注册成功',
        'verification_code_invalid': '验证码无效',
        'verification_code_expired': '验证码已过期',
        'login': '登录',
        'register': '注册',
        'forgot_password': '忘记密码？',
        'email': '邮箱',
        'password': '密码',
        'remember_me': '记住我（7天内免登录）',
        'sign_in': '登录',
        'username': '用户名',
        'repeat_password': '确认密码',
        'reset_password': '重置密码',
        'submit': '提交',
        'welcome': '欢迎使用学习平台',
        'welcome_back': '欢迎回来，请登录您的账户',
        'switch_language': '切换语言',
        'switch_theme': '切换主题',
        'logout': '退出登录',
        'my_dashboard': '我的面板',
        'network_drive': '网盘系统',
        'email_system': '邮箱系统',
        'code_compiler': '在线代码编译',
        'file_submission': '文件提交系统',
        'video_platform': '在线视频网站',
        'blog_space': '博客空间',
        'ai_platform': 'AI 平台',
        'code_repository': '代码仓库',
        'password_reset_sent': '密码重置邮件已发送，请查收',
        'invalid_reset_token': '无效或已过期的令牌',
        'password_reset_success': '密码重置成功',
        'account_created': '账户创建成功！您现在可以登录',
        'login_success': '登录成功',
        'account_login': '账号密码登录',
        'qr_login': '扫码登录',
        'email_placeholder': '请输入邮箱地址',
        'password_placeholder': '请输入密码',
        'other_login_methods': '其他登录方式',
        'wechat_login': '微信登录',
        'qq_login': 'QQ登录',
        'scan_qr_code': '请扫描二维码登录',
        'email_required': '邮箱不能为空',
        'invalid_email': '邮箱格式不正确',
        'password_required': '密码不能为空',
        'password_too_short': '密码至少需要8个字符',
        'no_account': '还没有账号？',
        'privacy_policy': '隐私政策',
        'terms_of_service': '服务条款'
    }
}

def get_text(key, lang):
    return translations.get(lang, {}).get(key, key)