${_('Welcome to Litefs')}

${_('The current locale is %s') % locale}

${_('Language')}

${_('Negotiation priority: query param > cookie > Accept-Language > default')}

${_('Dashboard')}

    % for menu in menus:
  • ${menu['label']}
  • % endfor

${_('You have %s unread notifications') % message_count}

${message_text}

${_('Switch language')}

curl "http://localhost:8086/?locale=en"
curl -H "Accept-Language: en-US,en;q=0.9" http://localhost:8086/
curl http://localhost:8086/api/locale

切换后浏览器会收到 Set-Cookie: locale=...,下次访问自动沿用上次选择。