Module request - Multilingual G3
OC2PS
Joined: 2010-09-08
Posts: 428 |
Posted: Sat, 2010-09-25 14:55 |
For us Europeans, this is a critical piece and should be part of the core. However, it has been suggested at http://sourceforge.net/apps/trac/gallery/ticket/1101 that this is something that needs to come as a contrib. So, question, please is anyone working on this? SoosKriszta |
|
Posts: 428
Not field of dreams anymore. Gopu is working on a module http://sourceforge.net/apps/trac/gallery/ticket/1101
SoosKriszta
Csillamvilag.com
Bodypainting, Facepainting, Glitter, Henna
Materials, Courses, Resources
Posts: 137
Hi,
Here is few screenshots of multilang add/edit page:
In context menu, you have "multilang edit" option
[img]http://gallery.menalto.com/files/context-menu.png[/img]
Upon clicking the context menu you will have multilang edit page, listing the locales installed in gallery3 and the multilang details
If multilang info not added, you have add button else edit button. The: button expands/collapse the locale section on each click alternatively (i.e. toggle the state):
[img]http://gallery.menalto.com/files/all-collapsed.png[/img]
[img]http://gallery.menalto.com/files/multilang-add.png[/img]
[img]http://gallery.menalto.com/files/edit-multilang.png[/img]
Beside the above, there will be UI blocks for sidebar for both user and admin, showing alternative languages that user can choose for a photo or album.
Please let me know your comments.
--------------------------------------------------------------------------------
my wings of love - work, experince, learnings, open source, technologies on my way to God
Posts: 428
Thanks! This is a much needed functionality.
In your example, what does "Add" refer to? (as in Add: Italian). You seem to have 4 languages installed, so why not just: Edit English (UK), Edit English (US), Edit German, Edit Italian?
I see that you have title, description and Internet address up for "multilingual edit". I think so should tags be.
Also, I assume you are leaving filename and created (photo) and directory name, sort by, order and created (album) to be edited in the "normal" edit.
Which language does the "normal" edit's title, description, internet address and tags populate? I would recommend "ALL". Then user should be able to go and make changes/translate. Another option would be hook into the Google Translate API and translate the "normal" text to each available language...and then all the user has to do is "Edit" i.e. make corrections....
SoosKriszta
Csillamvilag.com
Bodypainting, Facepainting, Glitter, Henna
Materials, Courses, Resources
Posts: 27300
gopu,
This looks very promising. Very good UI from what I can see from the screen-shots. Cool stuff!
I think I am with sooskriszta the 'add' is a bit confusing.
I don't think the user should be able to add a new language from this dialog. Perhaps I am missing something.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 137
Thank you both for the inputs !!!
Actually the Add here means the user has not added any multilang info yet for the language. Once he adds then next time it will be edit.
Otherwise how else just by seeing the button the user would know whether he has multilang detail for a installed language or not...
Let say you have installed a new language.
Next time you click "multilang edit" for a photo/album, you will have Add button instead of Edit for the newly installed language.
But however this creates confusion then we can remove it.
All the non-language specific properties like filename, sort order etc can be edited through standard Edit.
The multilang module assume that the user has the title, description and slug for the "default language" stored and managed by core.
For example if en_US is my default language, I will not have the en_US block in multilang edit.
Yes, using Google Translate API is certainly in my TODO list, but after releasing the first cut.
All the tags that you add in standard Edit Photo, is applicable for this multilang entries also.
Because you can add as many tags. The tags put no restriction what language the tags are.
I understand this has one limitation as the user will see all the tags (of all language)
Will think about it.
--------------------------------------------------------------------------------
my wings of love - work, experince, learnings, open source, technologies on my way to God
Posts: 428
Gopu, in the first version, I'd recommend just copying the "default" fields into the language fields.
Tags should be multilingual too...different languages will have different tags..not about how many tags are permitted...it is confusing for users to combine language tags...
Looking a bit ahead...gotta start thinking about reviews too...if a customer writes a review on a German page, it should appear only on the German page...although the rating (stars) should cut across languages....
Once again, many thanks for doing this...
SoosKriszta
Csillamvilag.com
Bodypainting, Facepainting, Glitter, Henna
Materials, Courses, Resources
Posts: 137
So, are you sure we should not have "Add" ???
For the tags and review requirement, the tags and review are tied with ITEM-ID
For one item we have one ITEM-ID. However for each item we can have several sets of multilang details (title, slug and description)
I am not sure how it can be done without doing everything (tag and review) as part of multilang module.
However, could be possible with some changes in Review and Tag module... will check that out later
--------------------------------------------------------------------------------
my wings of love - work, experince, learnings, open source, technologies on my way to God
Posts: 137
Well I have different take on Review..
Anybody who gives rating, he gives rating to the photo (the image file remain same for all language for a photo item), which is language independent
So why should it be limited to language ?
--------------------------------------------------------------------------------
my wings of love - work, experince, learnings, open source, technologies on my way to God
Posts: 428
That's why we need to think of review as composed of 2 different elements - ratings (stars) and text review.
Ratings are language independent, so the average should be calculated based on all reviews, irrespective of language.
However if I am a visitor on the German page, I don't care if someone has written a text review in Dutch or French - show me only the German text.
SoosKriszta
Csillamvilag.com
Bodypainting, Facepainting, Glitter, Henna
Materials, Courses, Resources
Posts: 137
Got you !
Will check this out in future - once the basic is out.
BTW, I am having the GOOGLE language translator in first cut itself as I realized its not that time taking.
--------------------------------------------------------------------------------
my wings of love - work, experince, learnings, open source, technologies on my way to God
Posts: 137
You mean beside "Internet Address" which is used to form URL of the item, the filename also should be multilingual ???
Note that filename is internal thing, used to fetch image file... it's not visible to end user (unless he does a view source)
You mean this is needed to be multilingual because SE uses it for image search indexing?
--------------------------------------------------------------------------------
my wings of love - work, experince, learnings, open source, technologies on my way to God
Posts: 428
Filename is not critical, I think, though good to have.
The URL and title are the most critical. And of course, tags and descriptions.
SoosKriszta
Csillamvilag.com
Bodypainting, Facepainting, Glitter, Henna
Materials, Courses, Resources
Posts: 137
Make sense
We will have filename also but not in first version. Because it has a potential to delay things, as it would need lot of testing.
So for version 2, we will have:
1. Tags
2. Multilang filename
Version 3
1. Review
--------------------------------------------------------------------------------
my wings of love - work, experince, learnings, open source, technologies on my way to God
Posts: 137
I see no problem here actually...
There wont be any 404.
For the multilingual filename feature, the user will be given three options:
1. Use same filename as the default one
2. Same file but different filename
3. Upload another file
Please note the default filename will always be present, will always be resolved correctly.
For first version, it's always (1) above... but that will be taken care in the coding.
In second version when you have multilingual filename, you can give new filenames...
Note that, the old filename (i.e. the default filename) will still resolve
The item/album URL is never changing anyway... the image URL will change, if want to change it
But the old image URL will still resolve.
--------------------------------------------------------------------------------
my wings of love - work, experince, learnings, open source, technologies on my way to God
Posts: 137
No, the default file name will still link to the right item. Because the default file name will still exist in DB for the item in items table. I know why you doubt it, its too technical to answer here in detail.
However the point below, I did not think about this.
But the above is also TRUE for (2)... because then two image URL will point to same image
Hence the only solution is in either (1) and (3) - (2) should not be an option
For (1) - the image file URL will remain same for all language
For (3) - the image file URL will different for different language
--------------------------------------------------------------------------------
my wings of love - work, experince, learnings, open source, technologies on my way to God
Posts: 137
Ok... will do some more research then let you know
--------------------------------------------------------------------------------
my wings of love - work, experince, learnings, open source, technologies on my way to God
Posts: 137
Hi sooskriszta,
Would you be able to find some half an hour to give me a second view on the module?
The module is attached.
Please note the following:
1. If Multlang3 module is activated, the URL for each item will be displayed wrt the User locale, that end user has selected (using language sidebar)
2. If there is NO user locale (stored as BROWSER COOKIES), the URLs will be in Default Locale
3. Multilang3 always gets the Default Locale photo info like Title, Desc, Internet Address from Core table(i.e. items).
We have issue here when the admin changes the default language.
4. For a given User locale, the item will be shown with User locale info from multilang table only if:
a) The item has multilang info entered
b) All the parent items till the ROOT also have the multilang info entered for the locale
Missing any of the above, it will show the default URL
Things I am working on:
1. Multilang Tags
2. Populating translated text(in edit form only, not in DB) using GOOGLE Lang API, when multilang is not entered
3. Optional User sidebar to show alternative locale URLs
4. Mutlilingualizing pathname
Please let me know
--------------------------------------------------------------------------------
my wings of love - work, experince, learnings, open source, technologies on my way to God
Posts: 1
Very good work,
I had at first by entertainment, confused the mode translation of the languages with the option of module " Multi-language support ".
When I understood that there is no link between them, it got much better.
I tested, It is convenient for me. This module is really indispensable.
Thank you for this work.
Posts: 137
Thanks Michel ....
As soon as I complete the above mentioned task, I will have it available as contrib module.
--------------------------------------------------------------------------------
my wings of love - work, experince, learnings, open source, technologies on my way to God
Posts: 428
Hey Gopu, Sorry, been away. Will be available for testing and providing an additional pair of eyes through the weekend.
SoosKriszta
Csillamvilag.com
Bodypainting, Facepainting, Glitter, Henna
Materials, Courses, Resources
Posts: 428
Looks good so far.
How do I do a multilingual edit for the root album?
SoosKriszta
Csillamvilag.com
Bodypainting, Facepainting, Glitter, Henna
Materials, Courses, Resources
Posts: 137
You can edit the root album using the Multilang Sidebar ...
That was not done when I uploaded the code last....
With the latest one you will have it.
Now I am in testing mode. I am planning to upload the source code as soon I am done with that.
In the first version I will not have GOOGLE translation - there are some issues with it.
--------------------------------------------------------------------------------
my wings of love - work, experince, learnings, open source, technologies on my way to God
Posts: 428
Cool! Google translation is not really critical for v1. Can you copy over the default language text into other languages so that these pages are still shown in other languages even if no "language" text has been input?
SoosKriszta
Csillamvilag.com
Bodypainting, Facepainting, Glitter, Henna
Materials, Courses, Resources
Posts: 137
Yes, that's been done ...
I have a question?
How critical is TAG feature?
Does it deserve to be there in in first version itself? Note that it may delay the release at least by a week.
Otherwise, I am all set to release in couple of days.
let me know.
--------------------------------------------------------------------------------
my wings of love - work, experince, learnings, open source, technologies on my way to God
Posts: 428
Tags are important, as both search engines and users see them. Personally, I'd rather wait a week to have the tags...
SoosKriszta
Csillamvilag.com
Bodypainting, Facepainting, Glitter, Henna
Materials, Courses, Resources
Posts: 137
Hi Hans,
Please note that there is only one description - no short and long description
Regarding image file name, please note the following:
1. The image file names are absolute (not virtual) in G3 - i.e. access to the file does not go through any processing (as in Gallery2). This makes G3 faster. However, unlike G2 it does not prevent image hot linking.
2. The image path is different from URL for an item. As of now (in multilang3) the image path of a core item is shared by all corresponding multilang items.
For example:
Say there is a URL: http://www.mysite.com/gallery/rose. Say the corresponding image file path is http://www.mysite.com/gallery/var/album/rose.jpg
Say there is spanish URL for same item is: http://www.mysite.com/gallery/rosa
In the above case, both:
The spanish item:
1. can share the same image file i.e. http://www.mysite.com/gallery/var/album/rose.jpg
2. can have different image file (copy of the same) say: http://www.mysite.com/gallery/var/album/rosa.jpg
3. can point to another uploaded image file say: http://www.mysite.com/gallery/var/album/rosa_new.jpg
All the three can be done...
For (1) - As for my understanding goes there is no duplicate content problem here. Because both the URL (english and spanish) have still different content even if they share same image link, the text is different.
For (2) - The content wise the URL is different, however two image URL points to same file... there could be duplicate content issue if GOOGLE checks for image URL
For (3) - there is NO duplicate related issue.
So, as I stated before, the option (2) could be problem... but (1) and (3) is fine.
(1) is by default - that happens now when we don't take different filename for multilang items
I hope I am clear... let me know if you think I am missing something.
--------------------------------------------------------------------------------
my wings of love - work, experince, learnings, open source, technologies on my way to God
Posts: 428
I think hans51's point regarding filenames is that the more items match (title, h1, url, filename, etc) the better it is for seo. I do (completely) agree with that.
However, I am inclined to believe that with G3, multilingual image file names are not possible - not in v1, not in v50. Thus, we have to decide which 1 among the 10 languages we have installed, is the "main" language, i.e. the one which will get the ever so slight additional advantage in terms of SEO compared to the other languages.
While the situation is not ideal, I think the solution you are bringing to the table, Gopu, solves 99% of the problem, is very good for SEO, and is the best that can be done with G3.
One question: What happens if 2 languages have the same URL for an image/page...?
SoosKriszta
Csillamvilag.com
Bodypainting, Facepainting, Glitter, Henna
Materials, Courses, Resources
Posts: 137
I have checked, it's possible. Multilingualizing filename has two reasons:
1. Image filename matching the search terms
2. Image having language specific texts (like "Happy Birthday" for e-card purpose etc...), should be different for different languages.
For (1) it's easy to implement. All that is required is to create a link filename for the actual file
(2) requires file upload.
--------------------------------------------------------------------------------
my wings of love - work, experince, learnings, open source, technologies on my way to God
Posts: 19
I have downlodaded the version from 28.8. Thank you! It is verry nice and it work.
But it is not failsafe. I have test it. You have to translate with this into another language. Then you can change the language and the album is shown with information in this language. And now try to change titel. If you do you would change titel and deskription in default language with the information of the language you use now.
An other problem could be that you have in standard theme more the one posibility to change information of the album or picture but there is only one for adding multilang support.
I like this feature verry much and I can use it. But others will have maybe some problems, so I would only tell you.
Posts: 428
You mean redirection? I would imagine duplicate content issue would neutralize any SEO advantage there to be gained out of this.
SoosKriszta
Csillamvilag.com
Bodypainting, Facepainting, Glitter, Henna
Materials, Courses, Resources
Posts: 428
Not so. G2 doesn't allow access to image folders, which by itself is detrimental to SEO.
Another, unforeseen problem, which I have actually faced, by the way, is that if a competitor marks your images as unsafe and even a tiny proportion of your images fall into the grey area, then forget about SEO, SERP...you wouldn't appear in image searches at all (unless the user turns safe search off, which no one does)....in order to get your images back into search results, you need to provide Google the image folder containing the "grey" images, which you cant do in G2.
So there!
SoosKriszta
Csillamvilag.com
Bodypainting, Facepainting, Glitter, Henna
Materials, Courses, Resources
Posts: 137
No, its not redirection... it's file system manager thing. something that's taken care by file manager.
But anyway, after thinking over it, decided not to have link. Because managing a link is cumbersome (when default filename is renamed)... instead of the file will be copied with the new name. That way it will work for windows user also (windows does not support link)
--------------------------------------------------------------------------------
my wings of love - work, experince, learnings, open source, technologies on my way to God
Posts: 137
hi gast2,
The one I published earlier is for test only. It's not supposed to be used for production... I figured out some bug myself, which I fixed.
I would request you to wait for some time for the tested and verified module.
Also, I did not get the problem that you have mentioned. Would you be bit clearer?
thanks.
--------------------------------------------------------------------------------
my wings of love - work, experince, learnings, open source, technologies on my way to God
Posts: 19
I have set default language to russian and installed german too.
Now I have an album and call it "тест". For german language I call "Test"
If my language russian I see the russian and in german the german titel. But if the language is german and I use "edit album" the german titel is diplayed. If I click "change" it will change the russian titel to this one from the german and not the german. With discription it is the same.
Posts: 137
Thank you gast2, I could reproduce the bug and fixed it.
--------------------------------------------------------------------------------
my wings of love - work, experince, learnings, open source, technologies on my way to God
Posts: 19
A question: Would it be possible to change the dialog of editing instead create a new one for multilanguage? Because now you can load up photos the you have to fill in information in default language and later you can translate it. When there is a possibilty in the editing dialog similar to this one in multilanguage with two or more langauges and the default on top you can complete all information at once.
Posts: 137
hi gast2, it's possible... will think about in later version...
Any kind of UI changes, mass edit etc. is low priority task.
In first version my focus is on SEO - anything that will help SEO.
--------------------------------------------------------------------------------
my wings of love - work, experince, learnings, open source, technologies on my way to God
Posts: 19
I´m not sure if it is a bug from multilang or from gallery them self.
But I have my default language set to russian. German is also installed. So i have to discribe photos in russian. But I am in Germany and prefer for my own german language. If i login gallery is always in german language. I don´t know why because default is russian. So I log in first I can see all in german but title and discription is default russian.
When I log out with russian language then gallery is in raussian when I log out in german language gallery is in german. If I log in after that everything will be fine. In german and in russian. But the first login.
When we can test a new version?
Posts: 137
Hi gast2,
Here is the priority of locale:
First priority - the URL locale. If the URL is German locale, then you will have everything in German, irrespective of what is your default locale or user locale. For example the URL http://www.mysite.com/gallery/rosa will always show spanish page including the gallery texts
Second priority - User locale i.e. the locale stored through COOKIES in browser - irrespective of whatever is default locale. For example For example the URL http://www.mysite.com/gallery/rose will show pages depends on the user locale. For spanish it's spanish, for german it's german... and if there is no user locale set, it will show in default language
Third priority - Default locale if the URL is non-multilang URL (i.e. default URL) and the user has not set any locale using Gallery language preferences
Besides this, for any item if for a particular locale multilang info not set, it will show the default information.
Also, for any item to show it's multilang URL, the all the parent item through Root item has to have multilang info set.
For example, say you have URL http://www.mysite.com/rose/beautiful_rose
Say for beautiful_rose you have entered hermosa_rosa for spanish language
But you have not set anything for rose album
In that case the URL for hermosa_rosa will always be shown as default URL, because the the spanish equivalient of rose item is not set
May be it's difficult to understand... once I send you the latest drop for testing it will be easier to understand.
I should be able to send that in couple of days.
--------------------------------------------------------------------------------
my wings of love - work, experince, learnings, open source, technologies on my way to God
Posts: 19
I have setup a test gallery for testing. http://vkw.square7.ch/gallery
Default language is russian. Also you can choose german or english. For all languages a have a translation for the album.
If I enter the domain I have language none an all is displayed in german expect the titel of the album is russian. I don´t need to log in so there no preferences of language. Cookies are deleted. I am interested how you see the page.
Posts: 137
Hi gast2,
It looks like your default language is English. Because I see English text. (the title is Russian because you have entered russian text)
You can change your default locale in Advanced Settings.
--------------------------------------------------------------------------------
my wings of love - work, experince, learnings, open source, technologies on my way to God
Posts: 19
You are not right! Because default language are russian. If you switch beetween the languages you will see a english titel if you choose englisch a russian if you choose russian or german if you use german langauge.
It is configurated well, but gallery choose not the default language it choose english for you and german for me. Without any other configuration. I think it depend maybe on the option in the browser because german/englisch prefered for me an spanish/englisch for you. If you want test I cann give you an admin account for some hours. So you can see the configuration on my installation.
Posts: 137
Possible !!! However I dont see any code in Gallery3 responsible of doing this.
Yes, you may give me admin account to check this out.
--------------------------------------------------------------------------------
my wings of love - work, experince, learnings, open source, technologies on my way to God
Posts: 19
Could you investigate something?
Posts: 35
Gopu, thank You very much! This is last module I need to be absolutelly happy with my gallery! Only one short question, will Your module support import of translated descriptions of items from Gallery 2?
Posts: 27300
I don't see any documentation for this module. Is there any volunteers to contribute back to the community that can assist with this? I can help but looking for somebody that has actual experience using the module. We can't expect the developer, gopu, to do everything, they have given much already.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 137
Vojtech, you mean importing multilang module details of G2, right?
yes that has to be done... else it won't be complete. However, for that you need to wait a while may be more than a month.
First version will have things that will boost up your SEO.
--------------------------------------------------------------------------------
my wings of love - work, experince, learnings, open source, technologies on my way to God
Posts: 137
Request for testing:
With this I have added all the features that I want to add in version 1:
What's new from the last release to test?
1. Sidebar block to show you the alternative localized versions available for an item - see image below
2. multilang TAG
3. Many bug fixes
[img]http://gallery.menalto.com/files/multilang-sidebar.png[/img]
multilang filename is not added yet, that's the next SEO work. Those who wants filenames to be multilang, need to wait for next release.
Please note this module requires in-depth testing, because this is to do with SEO. If there is a bug then it may adversely affect SEO.
Hence I won't release without getting a PASS from at least two persons other than me.
--------------------------------------------------------------------------------
my wings of love - work, experince, learnings, open source, technologies on my way to God
Posts: 46
thanks for the update. I have installed it over the older version in this thread. However, i don't see the sidebar as soon as i have installed your module (with or without localized versions activated for the sidebar).
are there any other prerequisites for the module?
I am using gallery3 version 41
Posts: 137
mr_hyde, please note the DB has been modified.
If you want to test on existing g3 instance, you need to:
1. Deactivate multilang3 module
2. Drop the multilang_items table:
DROP TABLE `<TABLE_PREFIX>multilang_items`
3. Activate multilang3 module again
To see the sidebar you need to select the "Localized Version" block in Admin->Appearance->Manage Sidebar
--------------------------------------------------------------------------------
my wings of love - work, experince, learnings, open source, technologies on my way to God