Which might result in doubly iconified language links on node. The issue would seem to be in languageicons_language_switch_links_alter(). Perhaps the option to pick which language links to have the icons should simply be removed? Then CSS can be used to hide the icons in the switcher block or node links, if people don't want them to be shown either place?

Introduced (and mentioned) in #904948: No icons are showing.

Comments

klonos’s picture

Freso’s picture

Status: Active » Needs review
StatusFileSize
new2.67 KB

Alright, please test this patch. It hides (and disables) the options altogether, and ignores them in the processing of language links as well. Could quite possibly use better wording - suggestions are most welcome.

I don't think this issue can have a happy ending until #1009360: Make locale_block_view return a renderable array instead of HTML has been resolved.

Freso’s picture

Updated the patch a bit. I'll probably commit this in the morrow unless outrage ensues before then.

klonos’s picture

Sorry Frederik, this got out of my radar because you said you'd commit it next day, so I said I'd just wait to test it when the next dev was available. You didn't commit though, so I didn't test ;)

Anyways..., the patch does fix the effect of #1067766: img tag messed-up for icon images in Node links (both title & alt attributes contain a nested img tag instead of text), but it also introduces the disabling of the option to disable node links which I need. If others have this need too, then you can use my temporary fix/workaround in post #3 over at #1067766: img tag messed-up for icon images in Node links (both title & alt attributes contain a nested img tag instead of text).

This is trivial (I understand that it is merely cosmetic), but may I also report that the '#collapsed' => TRUE, attribute in the 'Add language icons' fieldset has no effect (at least in firefox), since the fieldset is always presented expanded.

Lastly, may I ask which is this bug (issue # or link please) you mention that that cannot currently be resolved?

Freso’s picture

The bug that this is waiting on is referred/linked to in comment #2.

the patch does fix the [side] effect [...], but it also introduces the disabling of the option to disable node links which I need.

But the whole point of this issue is that, as it is, Drupal 7 doesn't care. There is no difference between node's language links and the language switcher block's language links. Thus, the options only serve to give a false impression of what's possible with the module.

[...] may I also report that the '#collapsed' => TRUE, attribute in the 'Add language icons' fieldset has no effect (at least in firefox), since the fieldset is always presented expanded.

That's a bug that should be filed against Drupal's core (possibly jQuery), then. (It worked fine in Chromium, when I tested there.)

klonos’s picture

Thanx for pointing out the core bug. I am heading over there so I can help with testing etc. As for the '#collapsed' => TRUE bug, I'll test some more because it might be a browser specific thing as you suggest (I'm only seeing it in latest firefox 4 x64 nightlies ATM), then file a core bug for it if it actually checks out.

Freso’s picture

Status: Needs review » Postponed

I just pushed my commit with the patch previously posted, only now with a link here.

Postponing until #1009360: Make locale_block_view return a renderable array instead of HTML is fixed, or another work-around shows itself.

batigol’s picture

klonos’s picture

Status: Postponed » Active

Yeah, there's a patch for D8 that can be manually applied to D7 too. Could we give that a try?

Freso’s picture

Status: Active » Postponed

As long as the patch isn't committed, there's no reason in "giving it a try". Its form is not final until it's been added to core.

klonos’s picture

Yeah, I meant to only add my comment as a reference to that issue and the patch so we can give it a try once it got fixed. While I was at it, I also switched status to active because I thought you'd want to give it a try sooner than waiting for it to be committed (you know how long it sometimes takes for core patches to get in). If it did work, then instead of me saying that this *might* solve another issue we'd post a comment saying that it actually does solve it and perhaps this way we'd also "push" for the fix to get in sooner ;)

jddeli’s picture

Version: 7.x-1.x-dev » 7.x-1.0
Assigned: Unassigned » jddeli
Status: Postponed » Active

I can not check or uncheck the options
Add language icons
Link types to add language icons.
options Node links
options Language switcher block
These options are currently disabled due to a bug that cannot currently be resolved. They may be reintroduced at a later stage.

klonos’s picture

Version: 7.x-1.0 » 7.x-1.x-dev
Assigned: jddeli » Unassigned
Status: Active » Postponed

Ε πατρίδα!...

- Μην αλλάζεις το πεδίο "Assigned" εκτός και αν πρόκειται να δουλέψεις ο ίδιος πάνω στον κώδικα με σκοπό να κάνεις upload ένα αρχείο .patch.
- Μην αλλάζεις το πεδίο "Version". Ότι διορθώνεται πάει πρώτα στην πιο πρόσφατη dev έκδοση και έπειτα (όταν έχουν μαζευτεί αρκετές διορθώσεις) βγαίνει μια καινούρια έκδοση.
- Το συγκεκριμένο issue έχει τεθεί σε κατάσταση αναμονής (Status: "postponed"), με βάση το γεγονός ότι δεν μπορούμε να λύσουμε το πρόβλημα #1009360: Make locale_block_view return a renderable array instead of HTML. Για περισσότερα, διάβασε παραπάνω στο #7. Είδη πρότεινα στον maintainer του module να δοκιμάσουμε κάτι με το δοκιμαστικό patch που υπάρχει για το θέμα που σου αναφέρω και δεν δέχτηκε να το κάνουμε έως ότου το πρόβλημα έχει λυθεί πλήρως σε μια επόμενη έκδοση του Drupal 7 (για να γίνει αυτό, θα πρέπει πρώτα το πραγματικό πρόβλημα να έχει λυθεί στο Drupal 8). Οπότε μην πειράζεις ούτε το πεδίο "Status".

Βλέπω ότι είσαι μέλος εδώ και πάνω από 3 χρόνια (περισσότερο από 'μένα). Θα 'πρεπε να γνωρίζεις ότι αν συνεχίσεις να αλλάζεις τα issues απλά επειδή έχεις αναλάβει ένα project το οποίο σε επείγει, το μόνο που θα καταφέρεις είναι να τσατίσεις τους πάντες και θα σταματήσουν να σου απαντούν (στην καλύτερη των περιπτώσεων). Ήδη ρισκάρω να με "επιπλήξουν" που σου απαντώ στα Ελληνικά εδώ (δεν γνωρίζω αν επιτρέπεται άλλη γλώσσα εκτός από Αγγλικά), αλλά βλέπω ότι σου είπαν τα ίδια πράγματα που σου λέω και εγώ αλλού και δεν πρέπει να το κατάλαβες.

Αυτάαα...

Josias’s picture

Assigned: Unassigned » Josias
Status: Postponed » Needs work

Your language icons block can be enabled in your page.tpl.php with:

Drupal 7

<?php
	$block = module_invoke('locale', 'block_view', 'language');
	print $block['content'];
?>

Drupal 6

<?php
	$block = module_invoke('locale', 'block', 'view', '0');
	print $block['content'];
?>
Con An’s picture

is there anything new in this issue?
i tried Josias solution. but nothing..
do i have to do something else or just use the code above?

--ε! πατρίδα!..

e.ku’s picture

@Freso , i'm beginner in using drupal and when i'v tried to use two language on my website the error message appears says that the icon language is disable due to bug ..... .
would you tell me please how can i use that patch file that you mention above ? and is it solve the problems or not yet???

thanks

klonos’s picture

@Freso: Hey Frederik! I guess you never got the time to test things as you said in #1009360-11: Make locale_block_view return a renderable array instead of HTML. Well, there's a new patch available now. Care to take a look?

susheel_c’s picture

Status: Needs work » Needs review

Any updates here? Seems like a simple enough thing to fix (but I'm no programmer)... can you let us know when it'll be pushed into a release of the mod?

Status: Needs review » Needs work

The last submitted patch, 1005144-03-disable_node_block_optionality-d7.patch, failed testing.

nujood’s picture

Assigned: Josias » nujood
klonos’s picture

Assigned: nujood » Unassigned

...please do not assign the issue to yourself unless you are going to work on it (provide a patch).

@Freso: Hey Frederik! My question in #17 still stands ;)

mike-michal’s picture

Hello everybody!

In Theme function theme_languageicons_icon($variables) change returned value to: return theme('image', $image);

It worked for me. But why the returned value was only language iso name? Don't f***n know :)

sami.etogo’s picture

Issue summary: View changes

Hello "Ozyrys"! I am new in Drupal. Where can I find the "theme_languageicons_icon($variables)"? Thank you!

joelpittet’s picture

@sami.etogo Here's a decent explanation:
https://www.drupal.org/node/457740

mariocantor’s picture

This solution works for me, maybe is not the best, but works..
1. go to http://www.flag-sprites.com/
2. Configure your sprite (flags you need)
3. download Css and Flags.png. Move the flags.png to your files directory
4.Create a Blog and make table using html and add the flags
5. add the flag classes to your css (provide by the site http://www.flag-sprites.com/), you must change the flags.png url.
6. now you have your own flags language block...
this is block example that I created
-I use US and UAE flags for English an Arabic

<table border="0" cellpadding= "5px"><tr><td>
<a href="http://yoursite.com/">
<img src="blank.gif" class="flag flag-us"  />  English
</a></td><td>
<a href="http:/yoursite.com/ar">
<img src="blank.gif" class="flag flag-ae" /> العربية

  • Freso committed 2547a2c on 8.x-1.x
    Bug #1005144 by Freso: Disable the node/block links options for now....
anybody’s picture

Issue tags: +Needs backport to D7

As this is now fixed for D8 this patch is marked as needs backport to D7.

dravenk’s picture

Version: 7.x-1.x-dev » 8.x-1.0-beta1
Issue tags: -Needs backport to D7
StatusFileSize
new89.98 KB

with core 8.5.3, the bug still exists.
t

prophet108’s picture

I updated this module (on an old D7 site) and now i don't have language switcher icons anymore and only see "These options are currently disabled due to a bug that cannot currently be resolved. They may be reintroduced at a later stage." Is there a patch for the D7 version yet? Thank you.

graham leach’s picture

Hello,

Here's my solution. Added to the bottom of theme.css

/**
 * GL  2022-05-28  I wanted to make language selector go away.
 *                 I could not figure out how to do it with the administration interface
 *                 I ended up having to resort to CSS, which is a drag, but works.
 *
 *                 NOTE:  Your specific language(s) to hide needs to be enumerated as below
 */
.translation_zh-hant {
  display: none;
}

.translation_zh-hans {
  display: none;
}
anybody’s picture

Version: 8.x-1.0-beta1 » 7.x-1.x-dev
Status: Needs work » Active