Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

change the language used for directory listing (autoindex)

76 views
Skip to first unread message

Zhang Weiwu

unread,
Aug 5, 2008, 5:03:02 AM8/5/08
to
Hello all

It's very important for me to be able to change the language of prompt
text in directory listing page, because I am offering file download,
without the proper language page I have to install php and use scripting
language to manage my directory listing.

By "change the language of prompt text" I mean the following:

* The word "Last Modified", "Name", "Description", "Size" must be in
my user's language (Chinese);
* The word of "Parent Directory" link must be in Chinese;
* The last modify date of the files must be in Chinese date format;

I googled around a lot of times seems nobody is talking about this topic
(is it not interesting for everybody?? or nobody had such need?).

Thanks in advance for hints or for pointing me to the right document to
read.

Best regards.
Zhang Weiwu

Kees Nuyt

unread,
Aug 5, 2008, 2:13:43 PM8/5/08
to

I don't have time to experiment now, but the two things I
would start exploring are:

- headername and indexoptions combined with
MultiViews (Content negotiation)
http://httpd.apache.org/docs/2.2/mod/mod_autoindex.html#headername
http://httpd.apache.org/docs/2.2/mod/mod_autoindex.html#indexoptions
(and other topics on the mod_autoindex page)
http://httpd.apache.org/docs/2.2/content-negotiation.html

- develop your own version of mod_autoindex, after all,
Apache is open source.

>Best regards.
>Zhang Weiwu
--
) Kees
(
c[_] It's supposed to be automatic but actually you have to press this button.
-- [#67]

Zhang Weiwu

unread,
Aug 5, 2008, 8:20:54 PM8/5/08
to
Kees Nuyt wrote:
> I don't have time to experiment now, but the two things I
> would start exploring are:
>
> - headername and indexoptions combined with
> MultiViews (Content negotiation)
> http://httpd.apache.org/docs/2.2/mod/mod_autoindex.html#headername
> http://httpd.apache.org/docs/2.2/mod/mod_autoindex.html#indexoptions
> (and other topics on the mod_autoindex page)
> http://httpd.apache.org/docs/2.2/content-negotiation.html

Checked. No matter what language version the browser request in content
negotiation, apache itself always return English message.

> - develop your own version of mod_autoindex, after all,

Yes, but in that case I'll start by modifying a PHP directory listing
script which is much easier to start work on than C code. Besides, if I
work on mod_autoindex it's better to add content negotiation to this
module, which is usually a lot more / difficult work than just changing
the prompt text language to Chinese.

In fact I also checked "DefaultLanguage" directive and set it to Chinese
just in the hope it can solve the problem. No.

Kees Nuyt

unread,
Aug 6, 2008, 2:51:18 PM8/6/08
to
On Wed, 06 Aug 2008 08:20:54 +0800, Zhang Weiwu
<zhang...@realss.com> wrote:

>Kees Nuyt wrote:
>> I don't have time to experiment now, but the two things I
>> would start exploring are:
>>
>> - headername and indexoptions combined with
>> MultiViews (Content negotiation)
>> http://httpd.apache.org/docs/2.2/mod/mod_autoindex.html#headername
>> http://httpd.apache.org/docs/2.2/mod/mod_autoindex.html#indexoptions
>> (and other topics on the mod_autoindex page)
>> http://httpd.apache.org/docs/2.2/content-negotiation.html
>
>Checked. No matter what language version the browser request in content
>negotiation, apache itself always return English message.

That's a pity.

>> - develop your own version of mod_autoindex, after all,
>
>Yes, but in that case I'll start by modifying a PHP directory listing
>script which is much easier to start work on than C code.

I agree. I would probably do the same.

>Besides, if I
>work on mod_autoindex it's better to add content negotiation to this
>module, which is usually a lot more / difficult work than just changing
>the prompt text language to Chinese.

I agree again.

>In fact I also checked "DefaultLanguage" directive and set it to Chinese
>just in the hope it can solve the problem. No.

Hmm. Internationalisation work to do for the Apache
team.... It's about time they get a Chinese sponsor :)

Thanks for the feedback. It's always nice to see someone
who thinks and tries himself instead of begging to be read
the manual aloud.
--
) Kees
(
c[_] The war isn't the war between the blacks and the whites,
the liberals and the conservatives, or the Federation and
the Romulans. It's between the clueful and the clueless.
-- an anonymous poster on cypherpunks list [#237]

0 new messages