In .htaccess what is the difference between doing
Header set Content-Language en
and
DefaultLanguage en
DefaultLanguage is intended for set the default language when a directory contains multiple language files, e.g.: index.html.en, index.html.fr.
They need to be set with AddLanguage in Apache configuration somewhere:
AddLanguage en .en
AddLanguage fr .fr
Files will these extensions will be delivered with the Content-Language HTTP header. If no extension is provided, can be a coincidence to have both methods generating the Content-Language header but if you want to explicitly set the document Content-Language may run slightly faster with explicit header definition, as it does not need to check the file extension and fallback to a default language if set.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With