Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I was wondering say i translated "File" which is used on one of my profile tabs into a different language, will it make the word "File" appear translated every other place or will it only be on that specific Profile Tab?
I'm asking this because I'm afraid that if I translate general words like "view" "File" and such it would break the Drupal system?
Any help would be much appreciated,
Regards,
Amir
Comments
Comment #1
Gábor HojtsyYes, Drupal can only store one translation for the same string, and it does not in fact know whether the string is used in an email, a page, or whatever, so it always uses the same translation. Drupal 7 introduced string contexts to say "view" as in "view content" or "view" as in "a view in views module". Drupal 6 does not have that.
Comment #2
ah000 CreditAttribution: ah000 commentedthanks alot for the quick reply,
so for example if I traslate: "Enter your e-mail address. You'll be sent a new password immediately"
how will the translated phrase exacly get stored in the Drupal 6?
I wonder what happends everytime the system encounters the word "password" , will it take what was translated in the this string corresponding to the word "password" or it would only care about the whole phrase ("Enter your e-mail address. You'll be sent a new password immediately") and would not look at each individual word inside the phrase. ... ?
Thanks,
Comment #3
Gábor HojtsyIt will only care about the whole phrase. "view" and "view content" are two entirely different strings to Drupal, the later will not have "view" replaced with the translation when displayed. This is essential to support language teams reorder sentences, have different variants and suffixes on words when used, etc.
Comment #4
ah000 CreditAttribution: ah000 commentedThanks so much,
The other question that I have is:
warning: Missing argument 2 for theme_l10n_client_message() in /mnt/r0105/d20/s17/b03325c3/www/DOMAIN.COM/modules/l10n_client/l10n_client.module on line 488.
ps.and ofcourse DOMAIN.com is my domain.
I'm getting this 'Warning' and the translations don't get saved,
I don't know what the problem is.
any thoughts?
Thanks again,
Comment #5
Gábor HojtsyThat sounds like a bug, changed title and recategorized the issue for that. Anybody else seen that?
Comment #6
hamza11 CreditAttribution: hamza11 commentedHi, I am having the same problem. The problem is with a field that is a taxonomy term. I have a view of type taxonomy term that displays terms and descriptions on the page. Terms are linked to another page. Taxonomy descriptions are being translated, but when translating terms and save translation, the client window displays the term has been translated by making it green. but when i reload the page the same error is displayed.
Missing argument 2 for theme_l10n_client_message()
and when i check the term in client window, it is still untranslated.
Please help me how to fix the error.
Thanks you.
Comment #7
hamza11 CreditAttribution: hamza11 commentedMy problem has been solved. here is some detail:
Actually, the problem was not within the module. I created a view of type taxonomy term. I pulled fields from term name, term image and term description. I wanted to wrap the term name field within a div with a unique class to easily apply styles to that field. So within views cofiguration page of the term name field, i checked the checkbox "Rewrite output of this field" and wrapped the field within a div. Then i wanted to link the field to a different path. so i checked "output this field as a link". and linked this field to my desired path. So, what happened? when i went to translate this field through localization client. i found the field wrapped with the markup like this:
<a href = "some/path"><div class = "some-class">The Field title</div></a>
I copied the entire text with the markup and just changed the field title like this:
<a href = "some/path"><div class = "some-class">Translated title</div></a>
When i saved the translation and refreshed the page to view the result, i got the error:
Missing argument 2 for theme_l10n_client_message()
Then i edited my view, unchecked the checkbox "Rewrite output of this field". and translated the title again with the Localization client and translation was successfully saved. I think the problem was that a block level tag (div) was wrapped within an inline level tag (a).
Because, later, i wrapped the field's output within a div using a specific template file, suggested by views module for that particular field, and there was no problem. because the translation string in localization client's window was like this:
<div class = "some-class"><a href = "some-path">The field title</a></div>
This time, the markup was the same, but now an inline level tag (a) was wrapped within a block level tag (div).
Thank you, The developers of this fantastic module, "Localization client". We can never so easily translate our content without the help of this module.
Thank you again.
Comment #8
truyenle CreditAttribution: truyenle commentedSame issue here and Not in the same case of #7. Just the Title Login of user login block.
Comment #9
GiorgosKPlease keep title descriptive of the issue
Comment #10
GiorgosKoops wrong textfield
Comment #11
udane CreditAttribution: udane commentedI have the same problem. I have this string in the header of the view:
<div class="pest1 activo"><a href="actividades-listado">Listado</a></div><div class="pest2"><a href="actividades-mapa">Mapa</a></div>
Any help please?
Comment #12
tomrishworth CreditAttribution: tomrishworth commentedI'm also receiving this error.
When I try to save a translation I get a blank page that says { "message": null }
Comment #13
Gábor HojtsyDrupal 6 is not supported. The same problem was not reported for Drupal 7.