markup-validator icon indicating copy to clipboard operation
markup-validator copied to clipboard

i18n enhancements

Open Joungkyun opened this issue 7 years ago • 0 comments

Currently, template directories are found in the order listed in the Language option in validator.conf.

Enhanced patches no longer use the Language option.

By referring to the Accept-Languages header value of the browser, the template directory is found in Accept-Language order.

For examples:

For example, if Accept-Languages is:

Accept-Languages: ko-KR,ko:q=0.7,en-GB:q=0.5,en:q=0.3

The validator will find the template in the following order:

  1. template/ko_KR
  2. template/ko
  3. tempalte/en_GB
  4. template/en

If there is no template corresponding to Accept-Languages, template/en_US will be used.

Joungkyun avatar Dec 09 '18 09:12 Joungkyun