Topic-icon Community Builder Field

Active Subscriptions:

None
12 years 1 month ago #21115 by andbal1
Hi, Community Builder integration is another fantastic tool of jfbconnect, it works perfctly, just a little question about facebook field mapping language. Is it possible map facebook field in italian? I mean for standard information about birthday, relationship...

best regards
The topic has been locked.
Active Subscriptions:

None
12 years 1 month ago #21154 by mtk
Replied by mtk on topic Community Builder Field

andbal1 wrote: Hi, Community Builder integration is another fantastic tool of jfbconnect, it works perfctly, just a little question about facebook field mapping language. Is it possible map facebook field in italian? I mean for standard information about birthday, relationship...

best regards

Hello Andrea,
regardless of the field type or what JFBC does or does not import, the field data is taken according to the language that the user has set the data to be.
if you refer to the language the fields labels (not the data itself) are displayed, then this needs to be set in Joomla (not in FB and not in JFBC).

Hope that helps.

Mati
The topic has been locked.
Active Subscriptions:

None
12 years 1 month ago #21231 by andbal1
Replied by andbal1 on topic Community Builder Field
Hi, tx for your reply, i mean imported dat from facebook and even if my users are italian and they are checked italian language in their facebook information, imported data in cb are english. for example if i set my relationship as "fidanzato" in community buolder i have "engaged" or about birthday i was born in "12 maggio 1979" but in community builder i have "12 may 1979". please could you help me? best regards
The topic has been locked.
Support Specialist
12 years 1 month ago #21246 by alzander
Replied by alzander on topic Community Builder Field
Andrea,
Surprisingly, we've never had this request before. I looked around, and think I have an answer, but I haven't been able to test extensively. The change below will force the language to always be a specific locale. It will not be dynamic in any way based on the user.

Edit the /components/com_jfbconnect/libraries/facebook.php file. Search for the function "getUserProfile($fbUserId, $fields) about half-way in to the file. You'll see a section that looks like:
$params = array(
   'method' => 'fql.query',
   'query' => $fql,
);
Change that to look like:
$params = array(
   'method' => 'fql.query',
   'query' => $fql,
   'locale' => 'it_IT',
);

From a quick test, that properly pulls in the users gender in the correct language. However, one issue we found was that the date is pulled in as an Italian string as well. If you try to assign this to a "date" field within Community Builder, an error will be thrown. PHP can't translate date strings from other languages than English, so that causes a problem. If you simply want to store the date in a text field, it should work, but obviously test.

I've made a tracker issue to try to add locales to future versions as well as fixing the date issue I found above.

Please test, and let us know how it goes,
Alex
The topic has been locked.
Active Subscriptions:

None
12 years 1 month ago #21278 by andbal1
Replied by andbal1 on topic Community Builder Field
Tx, it works for me, i use just CB to save data and now gender, relationship and birthday are in italian. best regards
The topic has been locked.
Support Specialist
12 years 1 month ago #21312 by alzander
Replied by alzander on topic Community Builder Field
Glad to hear that got it going for you. The locale change will not be in the upcoming 4.2 release, so when that comes out, if you upgrade, let us know and we can help you re-implement the change. It should be pretty similar though.

Thanks,
Alex
The topic has been locked.