For a site i wanted the Facebook comments in the native language of the site.
This isn't supported in the current module.

What does the attached patch do:

  • Creates an extra variable to store the language.
  • Add select field to select the correct language.
  • Pass the correct variable to javascript for output.
  • Delete the variable out of the database when uninstalled
  • Default value = en_US for the language variable

The patch can be applied to the 7.x-1.1 version.
For the language options i only added the default en_US and nl_NL. This still needs to be matched to what facebook supports.
https://www.facebook.com/translations/FacebookLocales.xml

A to do would be to read out this xml and add those languages dynamically to the select options, but at the moment i did not have enough time to do that.

Comments

mike.stijlloos created an issue. See original summary.

mqanneh’s picture

Assigned: Unassigned » mqanneh

Thank you for your effort on this patch, currently I'm woking on auto detecting the site language and display the facebook widget in the current user language instead of adding a drop down menu when a static options.

this will be available soon in the next dev version.

michael.acampora’s picture

No problem for the effort, detecting the language dynamically is a better solution.

Good luck with applying the auto detection and thanks for writing this lean and mean module.

PS:
Sorry for the duplicate issue giving you extra administration work, Drupal went down temporarily (500 error) when i hit the submit button and then i rewrote without checking if my previous content was saved.

yookoala’s picture

It is always good to have a manual fallback. Auto detect usually fails in Chinese because of language code difference in Drupal and other site.

westis’s picture

Language detection doesn't work yet? Can I set the language manually in the meantime?

webatelier’s picture

patch does not work on 1.1 dev
can this be implemented in a new dev version plz ?
===
patching file facebook_comments_block.install
patching file facebook_comments_block.module
Hunk #1 succeeded at 103 (offset 1 line).
Hunk #2 succeeded at 142 (offset 1 line).
Hunk #3 succeeded at 183 (offset 1 line).
patching file js/facebook_comments_block.js
Hunk #1 FAILED at 10.

  • mqanneh committed 0742492 on 7.x-1.x
    Issue #2689269 by mqanneh: Add language settings
    
mqanneh’s picture

Version: 7.x-1.1 » 7.x-1.x-dev
Status: Active » Fixed
StatusFileSize
new11.13 KB

Added lang setting.

mqanneh’s picture

mqanneh’s picture

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

Assigned: mqanneh » Unassigned

Fixed.