Hi,

thanks you very much for this module. I find it very useful and is saving me lots of boring work.

I am running my website in three languages but I am not able to translate web links because I get a message error reporting that that link already exists. Of course the link and probably the title are going to be the same but the content of each is translated. For example:

Web Link:

Title: Drupal
URL: http.//drupal.org/
Link Description:
(node en)
Drupal.org is the official website of Drupal, an open source content management platform.
(node es)
Drupal.org es la web oficial de Drupal, un sistema de gestión de contenido de código abierto.

As long the URL is the same and it cannot be different, it should be possible to have duplicate URLs and Titles. Afterall, for translation purposes and maybe in some other similar situations, node ID is unique although some otther inputs are duplicated.

I hope you get a solution for it in official release.

Thanks again!

psc

Comments

nancydru’s picture

Well, actually there are several things inherent in your request; all are valid. First, we are going to be reviewing all the queries very soon to see which ones need db_rewrite_sql; when that is done, i18n should be functional in Weblinks.

Perhaps more importantly, after that is done, if you wouldn't mind, you can help us evaluate whether we should add a language code to the weblinks table, which might allow us to have multiple descriptions in different languages. Maybe setting up i18n will eliminate this need, but I doubt it.

I don't have any other language than English. Based on Rmiddle's writings, I'm guessing he doesn't either. So help from someone who is multi-lingual would be extremely valuable.

metabits’s picture

Sure, if I can help, I would do it.

I am very limited because I cannot programm any single line of php code and I still have a partial knowledge of how Drupal works.
I am just a "clever user", so to say.

From your point of view as a programmer, I do not really know what would make more sense for having Web Links multilanguage. If you treat them as a standard node, you know i18n creates new nodes as translations of the original. On the other side, if you want to keep URL unique (and this also make very much sense), it could be maybe better to offer the posibility of translating the strings of Title and Description. This is an aproach similar to how menus are translated with the translation interface. I am not an expert on translation issues, but this is what I understand as localizing (am I wrong with the concept? maybe someone around knows better...)

For me as a multilanguage user, I think that a localize kind of system makes much more sense. I never understood why to create a new node when I already have one, only (or mainly) needing to translate Title, Contents and Menu of that certain node.

Anyway, if there's anything I could do...

psc

nancydru’s picture

I really don't know how i18n works its magic. I do know that it intercepts db_rewrite_sql as part of it.

Translating menus and translating titles are actually quite different under the covers. For static text in a module (such as a menu item), there is a "t" function that causes the Locale module to look for a list of translation strings (the "po" template) and substitutes the translated text. For user-entered text, such as titles and descriptions, I really don't know how it's done, but i18n is usually involved.

We don't need another programmer for this, we need a multi-lingual tester who understands how to get things translated. That's why we need people like you.

BTW, you might also want to look in the translation directory and do a translation file for your languages.

metabits’s picture

BTW, you might also want to look in the translation directory and do a translation file for your languages.

I'm on it! I am a bit slow but I will get it...

I let you know.

nancydru’s picture

I've just spent a couple of hours looking through the module carefully. It appears to me that we should be fine with i18n already. So I think your request boils down to one we've been talking about, that is allowing duplicate URLs. I'll start on this today.

nancydru’s picture

Title: Multilanguage support? » Multilanguage support / allow duplicate URLs
Assigned: Unassigned » nancydru
Status: Active » Fixed

Fix committed to 5.2 and 6.x branches - will be in the next release.

rmiddle’s picture

Status: Fixed » Closed (fixed)
akadimi’s picture

Status: Closed (fixed) » Active

Hello
I reopen this thread because it doesn't seem to work for me. I have a two-languages site (Arabic and French), and although I have done the usual configuration, translation still doesn't work for a weblinks node type.

With other types (blog, story), I have a 'Translate' link in each node. In a weblink node I don't have this link.
Otherwise, if I try to add the same link with another language I get a duplicated link error.

nancydru’s picture

Status: Active » Postponed (maintainer needs more info)

Are you using the 6.x-2.x-dev version?

BTW, you can turn off the duplicate link check.

rmiddle’s picture

Are you using 6.x-2.x or 6.x-1.5? Try 6.x-2.x that is a lot more standard code and more likely compatible with dual lang. Note 6.x-2.x is about to go stable. We will be doing the final release in the next few days.

Thanks
Robert

akadimi’s picture

I'm using the 6.x-1.6 version, I'll try the RC2 of 6.x-2 later this day and let you know the result
Regards

akadimi’s picture

OK translation worked fine with the 2.0-RC2 version, but I got a warning after uninstalling the previous version and installing the new one. Is there any way to properly uninstall the previous version?

I have now many lines like these:

# user warning: Unknown column 'urlhash' in 'field list' query: SELECT urlhash, url, weight, last_status, last_checked, click_count, last_click FROM weblinks WHERE nid = 17 AND vid=17 in /var/www/drupal/sites/all/modules/weblinks/weblinks.module on line 331.
# user warning: Unknown column 'urlhash' in 'field list' query: UPDATE weblinks SET nid = 17, vid = 17, click_count = 0, last_click = '0', weight = 0, urlhash = '24913a56bc62da3a7896a1fcb70d5da2', url = 'http://www.drupal.org' WHERE nid = 17 AND vid = 17 in /var/www/drupal/includes/common.inc on line 3422.

nancydru’s picture

It sounds like you haven't run update.php yet. Once you run that, the messages should go away.

akadimi’s picture

Yes you're right. Thanks
I noticed some bugs and some missed features, I'll open another issue.

nancydru’s picture

Status: Postponed (maintainer needs more info) » Fixed
nancydru’s picture

Status: Fixed » Closed (fixed)

Cleaning up the queue.