mquinson / po4a-website

Source code of https://po4a.org/
GNU General Public License v2.0
5 stars 5 forks source link

.htaccess: Append AddLanguage #9

Closed rffontenelle closed 6 years ago

rffontenelle commented 6 years ago

Just using AddType doesn't seem to give translated content for web browsers set for Portuguese (Brazil) or Chinese (Simplified) languages. Adding the "AddLanguage" directive with the lowercase-and-dash version of the language codes seems to do the job -- worked for me locally.

About AddLanguage: https://httpd.apache.org/docs/2.4/pt-br/mod/mod_mime.html#addlanguage

This hopefully fixes mquinson/po4a#139

rffontenelle commented 6 years ago

Basically, AddLanguage directive allows to lead a requested language-tag to a certain extension. So, if the web browser requests "pt-br" we can tell it to access pages with extension ".pt_BR".