A maneira mais fácil de fazer isso:
set $first_language $http_accept_language;
if ($http_accept_language ~* '^(.+?),') {
set $first_language $1;
}
set $language_suffix 'en';
if ($first_language ~* 'de') {
set $language_suffix 'de';
}
location / {
try_files $uri/$language_suffix/index.html $uri $uri.html;
}