Re: local links and bilingual pages

Moof <[email protected]>
Newsgroups gmane.comp.web.pyblosxom.user
Message-ID <[email protected]>
Pablo Barrera González wrote:

> Hello  
>
> My name is Pablo Barrera and I'm from Spain. I new in the pyblosxom
> world but I think this is a great tool. I would like to use pyblosxom
> for creating my new web pages but I've to unsolved problems. 

Hola,
Me llamo Giles Antonio Radford, y también me encuentro en España.

> First I would like to do put a link to my photos without using the
> global URL. For example
> 
> <img src="$base_url/images/myself.jpg" />...
>
> I don't know how to do this. The only solution I found is using the
> complete url (http://myhost.com/myself/images...). Is there any way of
> doing this or should I modify the parser for understanding the $base_url
> variable?

Is there any particular reason you can't just use "/images/myself.jpg"?

Check that there is no # symbol in front of py['base_url'] in the config.py
file. I know that my one has it, and it looks like the standard one has one
there too. If it's there, then remove it.

> The other question is related with bilingual pages. My page is in
> spanish but I would like have another version in English. Is there and
> plugin or similar for doing this? For example write a story with the two
> contents
> 
> $ cat history.txt
> -LANG=es
> Histora
> <p>la historia</p>
> -LANG=us
> Story
> <p>the history</p>

-LANG=es
Esto es una forma rara de hacer las cosas :)

¡Buf! Las páginas bilingües son una cosa que me he estado planteando
bastante tiempo. Lo dificil es encontrar una forma de hacerlo que funcióne bien.

Escribir un plugin que te parsée ese tipo de archivo no es dificil, pero lo
que tienes que planterate mejor es como lo quieres presentar en la página,
porque esto te puede guiar en formas mejores de hacerlo.

¿Estás seguro que, por ejemplo, no prefieres meter las lenguas diferentes en
dos directorios separados, y poner un link de un pyblosxom al otro? ¿O poner
el texto español en un archivo que termine en .es y otro que termine en .en?
¿Cuál pondrias como página principal? ¿O te gustaria mirar a ver si es
posible adivinar si alguien lo quiere en español o en inglés?

Es bastante complejo. Si quieres, te puedo ayudar a mirar las formas de
hacerlo y hackear a pyblosxom para que te funcióne, pero estas proximas 2 o
3 semanas lo tengo un poco dificil meterle mucho tiempo.
-LANG=en
This si a strange way to format a file

Bah! Bilingual pages are something I've been looking into, on and off, for
quite a while. The problem is finding a way for it to work well.

It's not difficult to write a plugin to parse that sort of file, but
something you need to think about before doing that is how you want to
present the page, as you might come up with better ideas as to how to do it.

Are you sure thet you don't want to, for example, keep the different
languages in different directory structures and have links form one
pyblosxom instance ot the other? Or maybe you might prefer to put spanish
text in a file that ends in .es and the english in files that end in .en?
Which language would be the default one when you arrive at the page? Do you
want to look at guessing what language the person wants to see?

It's a bit complicated. If you like, I could help you look into the
different ways of doign it, and even hacking pyblosxom to get it workign
like that, though finding time to do much for this is going to be difficult
over the next 2-3 weeks...

Moof
-- 
Giles Antonio Radford - <http://metamoof.net/> - <http://wompom.com/>
python -c 'l = (("asynchat", 653, 658), ("httplib", 162, 170), ("pickle",
46, 53),("sched", 145, 149), ("re", 32, 35)); w=[__import__(x[0]).__doc__[
x[1]:x[2]] for x in l]; w[3] += w.pop(); print "".join(w)'





-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.