const LOCALE_TO_LANGUAGE: Record<string, string> = {
  ru: 'Russian',
  en: 'English',
  de: 'German',
  fr: 'French',
  es: 'Spanish',
  it: 'Italian',
  pt: 'Portuguese',
  uk: 'Ukrainian',
  pl: 'Polish',
  zh: 'Chinese',
  ja: 'Japanese',
  ko: 'Korean',
};

export function getLocaleInstruction(locale?: string): string {
  if (!locale) return '';
  const lang = locale.split('-')[0];
  const name = LOCALE_TO_LANGUAGE[lang] ?? lang;
  return `\n<response_language>\nUser's locale is ${locale}. Always format your response in ${name}.\n</response_language>`;
}
