multilingual - changes and problems

Creating and modifying plugins.
Post Reply
robi-bobi
Regular
Posts: 40
Joined: Mon Nov 21, 2005 12:40 pm
Location: Bulgaria
Contact:

multilingual - changes and problems

Post by robi-bobi »

I was not sure where to post this - if this is not the right place, please move it to the right forum

Some problems I have

1) I am using s9y 1.0 alpha and latest versions of plugins. in the language selector (in the frontend sidebar) the choosen language is not selected - is this normal behavior?
it is not good, because when I configurate it without submit button there is no way to go to the first language (no onchange event will be triggered)

2) I have article in 2 languages:
http://www.photography-reviews.com/inde ... lected]=bg
and
http://www.photography-reviews.com/inde ... d]=default
click on one of those URLs and then try to change the language by using language selector
it does not work for me

3) I would like that poll plugin is language dependant also

4) I asked garvin about this: I want that permanent URLs of entries in languages other than default are also search engine friendly (contain title in itself). He said that it will be an overkill, but while reading some code (damn, I am new to SMARTY) I fugured that the title is already selected from the DB in all languages.
Second parameter of function getLang in serendipity_event_multilingual class contains the whole article in all languages (this is something that I call overkill ;) ) - but this is also something that will make my wish very easy to implement (at least I think so). What do you think?

5) can we have option in the plugin configuration that will say:
show languages as '<select > field' or as 'list of links'. The second one is more SEO friendly (which reminds me that the other way of ding this task in by: inserting links to blog at specific languages in the 'language specific nudget', and even by using mod_rewrite to make them more readable. The bad thing about this is that language chooser is showed even if I have not selected languages to show in it ).

I hope that I was clear (sorry for my english)

thanks to multilingual plugin authors for creating it :)
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: multilingual - changes and problems

Post by garvinhicking »

Hi!
1) I am using s9y 1.0 alpha and latest versions of plugins. in the language selector (in the frontend sidebar) the choosen language is not selected - is this normal behavior?
it is not good, because when I configurate it without submit button there is no way to go to the first language (no onchange event will be triggered)
Actually, the "default" language is selected by default. It is a kind of special language, because that is the actual content of the serendipity_entries.body columns. All other languages are stored within the serendipity_entryproperties table. So it's actually required that you enter a "default" language with no language association at all. Which will then be displayed for all languages that you did not configure/enter the entry for. This would be impossible to indicate if no such defaule entry would be made.
2) I have article in 2 languages:
http://www.photography-reviews.com/inde ... lected]=bg
and
http://www.photography-reviews.com/inde ... d]=default
click on one of those URLs and then try to change the language by using language selector
it does not work for me
The language selection of your logged in user currently takes precendence over switching the language via HTTP. That is a somewhat known glitch of the multilangual plugin. Since I do not use it personally, I did not yet feel pushed to change that in any way, since it involves some parts of internal serendipity core logic and how languages are handled internally.
3) I would like that poll plugin is language dependant also
I would like that, too. ;-)
4) I asked garvin about this: I want that permanent URLs of entries in languages other than default are also search engine friendly (contain title in itself). He said that it will be an overkill, but while reading some code (damn, I am new to SMARTY) I fugured that the title is already selected from the DB in all languages.
Second parameter of function getLang in serendipity_event_multilingual class contains the whole article in all languages (this is something that I call overkill ;) ) - but this is also something that will make my wish very easy to implement (at least I think so). What do you think?
I haven't really looked into this (see above, I'm not really using the multilingual plugin ;) - but if you use a %id% parameter in your permalinks this would work. The hard work would be to use permalinks without %id% and get that to work.

[/quote]
5) can we have option in the plugin configuration that will say:
show languages as '<select > field' or as 'list of links'. The second one is more SEO friendly (which reminds me that the other way of ding this task in by: inserting links to blog at specific languages in the 'language specific nudget', and even by using mod_rewrite to make them more readable. The bad thing about this is that language chooser is showed even if I have not selected languages to show in it ).
[/quote]

Hm, this would then require javascript -- I am pretty sure that <a href>-links are a better way to represent links to other languages?

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Guest

Post by Guest »

garvin is here faster than a light :)

ok, i got the answer 2)
I think that this is not good, but at least it is better than what I have thought
it also explains my 1st question

3) :)

4) what I am saying is this:
this is link for entry in default language:
http://www.photography-reviews.com/phot ... guage.html
but the link in some other language is like this:
http://www.photography-reviews.com/inde ... lected]=bg
since there is variable with titles in specific languages, It should be easy to create similar link:
http://www.photography-reviews.com/phot ... guage.html
together with entry id and language code

5) it looks like I was not clear enough:
currently language chooser is showed with <select> field
what I want is list of links showed as <a href="..."> (and maybe flags of the countries beside)
robi-bobi
Regular
Posts: 40
Joined: Mon Nov 21, 2005 12:40 pm
Location: Bulgaria
Contact:

Post by robi-bobi »

^ that was me

and to fix typo-s I will repost part of the message above:

4) what I am saying is this:
this is link for entry in default language:
http://www.photography-reviews.com/phot ... guage.html
but the link in some other language is like this:
http://www.photography-reviews.com/inde ... lected]=bg
since there is variable with titles in specific languages, It should be easy to create similar link:
http://www.photography-reviews.com/phot ... guage.html
together with entry id and language code
robi-bobi
Regular
Posts: 40
Joined: Mon Nov 21, 2005 12:40 pm
Location: Bulgaria
Contact:

Post by robi-bobi »

and just another thought:
lets say that
- I have language choser selected to bulgarian and I press Go! :)
- I read entries in bulgarian
- I click on 'English' link under one entry
- the entry is showed in english
- but the selected language is still bulgarian

I know that it is not clear which approach is better, but I think that it is better to change selected language as well if user asks for some content in different language

(and, no, I was not logged during testing this :) )
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

I've just committed a change to the 1.0-alpha trunk where the handling of the default language should be in synch with what you are requesting. :)

About the permalinks: Well, this would be possible, but takes some time to code. I don't have enough motivation to do that, so you might need to get involved with PHP and Smarty yourself or maybe some other developer might wants to take care of it? Hope you can understand that, but I have to cut my efforts somewhere, since time is limited even for me. :)

The same applies to the language chooser: By editing the plugin file it would be pretty easy to make the <option> fields into <a href> output, maybe you could get started with that? :)

Basically, since I don't really write bilingually, my efforts in this plugin regard are really a bit too low. I understand all of your requests, and I would love if they can be implemented. Technically, it's all there and technically no problem to implement it. :)

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
robi-bobi
Regular
Posts: 40
Joined: Mon Nov 21, 2005 12:40 pm
Location: Bulgaria
Contact:

Post by robi-bobi »

i agree with you and I understand you

my post was more like: here are some of my problems - is it just me or ...
:)

I found that in one case it was only me, in other it was not


I know that time is limited (but, I am not sure that this is true for you :P )
taking this in consideration - expect modification of languagechooser where you will have option in its configuration - show <select> field or show <a href> links

I am programming with PHP for a couple of years, and I know that this should not be a big thing to do. On the other side, this is the first time i run into SMARTY and so much templated CMS :) so don't expect modification _very_soon_. I prefer knowing the system before starting to work.

can you point me to some plugin which uses its own .htaccess rules (I want to see how it adds and removes them later)
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!
I am programming with PHP for a couple of years, and I know that this should not be a big thing to do. On the other side, this is the first time i run into SMARTY and so much templated CMS :) so don't expect modification _very_soon_. I prefer knowing the system before starting to work.
Would be cool if you could just look at it. If you have problems or questions, I'm sure willing to help of course! :)
can you point me to some plugin which uses its own .htaccess rules (I want to see how it adds and removes them later)
I don't know if I understand you right on this - but there exists no plugin that modifies the .htaccess file.

We have a generic rewrite rule that plugins can use: http://example.com/serendipity/plugin/*. Where * can be any kind of URL pattern you want to use, and a plugin can then listen on the external_plugin hook.

So you could use http://example.com/serendipity/plugin/myownplugin.html which would then execute any PHP code you like in your plugin. An example for that is the captcha image generation of the spamblock plugin or the PDF generation of the blogpdf plugin.

HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply