Closed (outdated)
Project:
Facebook Like Button
Version:
7.x-1.2
Component:
Miscellaneous
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Anonymous (not verified)
Created:
14 Jun 2011 at 18:12 UTC
Updated:
20 Oct 2025 at 09:41 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
jerdiggity commentedThanks!
Anyway, the answer to your question is, "No... It won't change automatically." The default language that the button will be displayed in is U.S. English (aka
en_US), but this is completely customizable through the admin interface by navigating towww.example.com/admin/config/fblikebutton/generaland, toward the bottom, setting the Language accordingly. (Incidentally I looked at one of the links you provided, and from what I can tell the language code that you would probably want to use would bept_PTas opposed to the defaulten_US.)I should also note that the language code set under General settings is completely separate from the language code used for the site-wide block. Both default to English, however they can be set to two entirely different settings if you prefer.
Hope that helps... :)
j
Comment #2
jerdiggity commentedComment #3
tommychrisIs there any chance to create a behavior, to the button appear used the current user's language, not the site-wide global language or the language setted the admin page?
Comment #4
Anonymous (not verified) commentedHi jerdiggity
Yes i made the changes of language.
but with multi-language i can't set for each, on ech page, well i think...
is there a way or could be one?
Best regards
ArchGalileu
Comment #5
tommychrisI'm created a solution, where the code detects the current language, and tries to use it. If FB like button not available for the current language, it uses English.
THe code works for only the like button, not the block. for the like button, it omits the admin settings.
The best solution maybe the next:
The admin site uses a drop down list for all avilable languages. And a checkbox. If the checkbox ticked, all FB script uses the language setted in drop down. If the checkbox is unticked, the script tries to use the current language, if available. If not, uses the selected value - as a default value.
One problem, which I don't know how Drupal handle it: Some language used more than one territory (like 'en', and 'en_GB', 'en_US', etc...). I use Drupal with english and hungarian language, and not installed more.
I don't know how to make a .patch, so the modified lines are below (all in fblikebutton.module):
Add the code below to the end of the file
Comment #6
bmunslow commentedHi,
I think a more elegant solution would be to use the Variable module.
If you are using i18n, simply unzip this file and upload it into the module's folder and now you can set a different language setting for each setting.
When you enter the admin settings of the module you will see a message with the right links to translate the field.
Comment #7
lliss commentedIn response to #6, I'm not thrilled about adding a dependency for this. Plus we know all of Drupal's language options and we know all of Facebook's language options so we just need to make a mapping of one to the other and provide a few options to use it.
I'll like what's going on in #2 generally but I want to provide the option to use a different language than is defined on the site overall. I'll work on a combination of ideas and see what I can do with it.
Comment #8
selinav commented2 years after, what is the best solution (drupal 7) to translate it ?
Comment #9
selinav commented>> #7 Iliss, I have tried your solution but it doesn't works I can't "translate" it for the different language, I've not the "multilingual variable" message.
I've flush the cache. What should I do ?
Comment #10
selinav commentedSorry I've found, It should also enable multilanguage variable on Administration> Settings> Regional and language> Multilingual settings page (variable tabs).
Comment #11
pankajsachdeva commentedComment #12
lasseitorp commented#6 worked like a charm! Just what I needed, Thanks!
Comment #13
iamfredrik commentedMade a patch based on code in #5.
Comment #14
leducdubleuet commentedThe patch in #13 works like a charm and applies cleanly to current version 2.6.
Thank you very much, this is must for the next release in my opinion!
Comment #15
astonvictor commentedD7 reached its EOL back in January 2025, and there is no active release for D7 for this module anymore.
Development or support is not planned for D7. All D7-related issues are marked as outdated in a bunch.