Welcome, Guest
Username Password: Remember me
  • Page:
  • 1

TOPIC: Change Language

Change Language 2 years, 5 months ago #7

  • seppi
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
  • Karma: 0
Hi

Thank you so much for this excellent module!

I managed to customize it for my needs, except the language: Do you got a hint for me, how/where I can switch the FB titles (like, share, "at") to another language?

Thanks in advance

Re: Change Language 2 years, 5 months ago #9

  • linhnt
  • OFFLINE
  • Administrator
  • Posts: 120
  • Karma: 0
Hi,
The language can be changed by translate the language file.
The language file default is en-GB for English.
Please copy the file, rename it to match your language, then copy it to the right folder match your language.
For example:
/en-GB/en-GB.mod_abc.ini to /es-ES/es-ES.mod_abd.ini

Then edit file ini and translate the string as you want.


Thanks for using our products!
Last Edit: 2 years, 5 months ago by linhnt.

Re: Change Language 2 years, 5 months ago #12

  • seppi
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
  • Karma: 0
Hi linhnt

Thank you for your reply.

I found the file and checked it out. But as I see it, I only can change the backend language there, correct? But I would like to change the "native facebook stuff".

In the end of the file de-DE.mod_fbwallfeed.ini, after the backend strings I found 2 entries

; jtext at code
AT = "vom "
IN = " — in"

But I have no idea how to finde the other string names like "changed their Current Location" or "at" (for Facebook Events) as well as the date language/format. I tried but couldn't manage to hit the right name.

Can you tell me, which strings I have to enter in the .ini (I could provide you with a german translation, then) in order to change those FB text strings?

Or - if those strings come directly from Mr. Zuckerberg - is there any possibility in the module, to tell FB (API?) what language file it should load?

Thanks for your ongoing support.

S.

Re: Change Language 2 years, 5 months ago #13

  • linhnt
  • OFFLINE
  • Administrator
  • Posts: 120
  • Karma: 0
Hi,
Very sorry that we can't change the facebook stuff's string.

Did you try change your facebook account to work and display in DE?
(in facebook.com, all you see will be in DE, so the content you get maybe have chance to be in DE - just my think)

Thanks

Re: Change Language 1 year, 5 months ago #271

  • csvj
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
  • Karma: 0
Hi guys, I think it is a great extension, but I also need the facebook "stuff" translated. I wonder if the issue is that no language parameter is being set in the code, so the english language is set by default. Regards, Clovis.

Re: Change Language 1 year ago #351

  • shuhu
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
  • Karma: 0
Hi I see this is not resolved yet, my Facebook account is in Spanish, yet the extention shows everything in english, most of the final users will understand it in english but the website is in spanish so it looks odd.

I would be amazing if we could choose the frontend language other than that I really like this extension.

Re: Change Language 1 year ago #353

  • linhnt
  • OFFLINE
  • Administrator
  • Posts: 120
  • Karma: 0
Hi,
Please follow post #9 and #12 to translate "at", "in" words.

To specify locale for what facebook return, you can do this (we will add this to next update):

Edit helper.php, find this code:
$user_feed = $facebook->api('/'.$page_id.'/feed/', array('access_token' => $facebook->access_token,'limit'=>$page_limited));


and change to:
$user_feed = $facebook->api('/'.$page_id.'/feed/', array('access_token' => $facebook->access_token,'limit'=>$page_limited, 'locale'=>'es_ES'));


Hope this help and please tell us the result.

Thanks
Last Edit: 12 months ago by linhnt.

Re: Change Language 12 months ago #354

  • shuhu
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
  • Karma: 0
Thanks linhnt

I tried it but did not changed the language of the words "Like" and "Comment", I even tried it while I was also logged out of facebook in case that made a difference, although my Facebook is set to Spanish anyway, but no luck either.

Btw there was a little mistake in the code you gave me.

facebook->access_token


was missing the "$" as the original help.php has it

$facebook->access_token


It broke my page without it... But the language change did not worked anyway

Re: Change Language 12 months ago #355

  • linhnt
  • OFFLINE
  • Administrator
  • Posts: 120
  • Karma: 0
Yes, typing misstaken. Thanks for notice.

By add locale es_ES, almost notification will be translated. But "Like", "Comment" will not be translated because facebook return "Like", "comment" regardless we specified locale. It is painful.

But you can do this trick:

Edit /tmpl/default.php, find this code:
foreach ($post['actions'] as $post_action) {
  echo JHTML::_('link', $post_action['link'], $post_action['name'], 'class="post-action-link" target="_blank"');
}

Change to:
foreach ($post['actions'] as $post_action) {
  if (strtolower($post_action['name']) == "like"){
    echo JHTML::_('link', $post_action['link'], "YOUR_WORD_FOR_LIKE", 'class="post-action-link" target="_blank"');
  }
  else if (strtolower($post_action['name']) == "comment"){
    echo JHTML::_('link', $post_action['link'], "YOUR_WORD_FOR_COMMENT", 'class="post-action-link" target="_blank"');
  }
  else {
    echo JHTML::_('link', $post_action['link'], $post_action['name'], 'class="post-action-link" target="_blank"');
  }
}


Hope this help
Thanks
The following user(s) said Thank You: shuhu

Re: Change Language 12 months ago #356

  • shuhu
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
  • Karma: 0
You did it! it worked!

Thank you so much for your time and help
Last Edit: 12 months ago by shuhu.
  • Page:
  • 1
Time to create page: 0.26 seconds