: Change Apache +Indexes language I have a webpage with Index activated. I have this: Is there any way for change language of this, using .htaccess? I've already tried this Directives: AddLanguage
I have a webpage with Index activated.
I have this:
Is there any way for change language of this, using .htaccess?
I've already tried this Directives:
AddLanguage pt .pt
DefaultLanguage pt-PT
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP:Accept-Language} ^.*(pt).*$ [NC]
RewriteRule ^(.*)$ - [env=lang:%1]
More posts by @Margaret670
2 Comments
Sorted by latest first Latest Oldest Best
As you already guessed you can use jQuery to change the styling and other things like labels. However there is a better way and that is changing Apache's index template files. This can be done easily in the .htaccess file by using HeaderName and ReadmeName see below.
To use your own header and footer files you can use:
IndexOptions +SuppressHTMLPreamble
HeaderName /includes/header.html
ReadmeName /includes/footer.html
You could also opt to use a Directory Listing template that has been made by other people that will save you time:
H5ai
Apaxy
Indices
Mabishu Apache Autoindex
Repos Style
Alternatively you could check out this quality guide on making your own Directory Listing template in several easy steps.
Foud a way using jQuery .replace:
$(document).ready(function(){
$('body table tbody tr th a').each(function(i){ // THE OBJECT WHERE IS THE REPLACEING TEXT
$(this).html($(this).html().replace('Name','LOREN IPSUN'));
$(this).html($(this).html().replace('Last modified','LOREN IPSUN'));
$(this).html($(this).html().replace('Size','LOREN IPSUN'));
$(this).html($(this).html().replace('Description','LOREN IPSUN'));
});
});
Just change loren ipsun for whatever you want.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.