By damodamo on Monday, 23 December 2013
Posted in General Issues
Replies 11
Likes 0
Views 1.6K
Votes 0
hi

is there somewhere in easysocial i can do a language override?
thanks
Hi,

You can actually directly do language override with Joomla's Language manager.
·
Monday, 23 December 2013 16:06
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks
·
Monday, 23 December 2013 16:09
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi,

You're welcome.
·
Monday, 23 December 2013 16:10
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks but where would I go to find out the exact string I want to override ... there are a lot of EasySocial language files and I cant seem to find the one that allows me to change

Your Friends
Online Friends

in the side menu ..

Thanks
·
Monday, 23 December 2013 18:24
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Damian,

Other language strings can be found within apps / custom fields. In this case, you should be editing the friend app's language file, /administrator/language/en-GB/en-GB.plg_app_user_friends.ini
·
Tuesday, 24 December 2013 11:59
·
0 Likes
·
0 Votes
·
0 Comments
·
Good post for my question. I'm considering changing the FRIENDS value to something like ASSOCIATES. Problem is, you have about 175 different language constants that use the word friend. That's a LOT of overrides:)

I'm guessing from a quick glance at the code, there's no global feature for the "friend" value. THAT would be a great constant (friend, friends) instead of 175 different strings. Am I wrong, or do you have any suggestions of an easier way to change the word/concept of "friend"?
·
Friday, 27 December 2013 21:43
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Marco,

I don't think that it makes sense to have the "friends" word be a constant. It should be overriden via the language file
·
Friday, 27 December 2013 23:39
·
0 Likes
·
0 Votes
·
0 Comments
·
Well yah the overrides should be done via the language file. But what I mean is, right now you have about 175 constants like this: COM_EASYSOCIAL_TOOLBAR_YOUR_FRIENDS using the word friend. So if I wanted to change this from a Facebook type app to a professional network (associates instead of friends) then I have to make 175 overrides. Whereas, if there was some way to have a constant for FRIEND and FRIENDS, then I'd only have to make 2 overrides.

This is probably wrong because I dont really know much about .ini files, but I think you could do something like:

PHP here: echo JText::sprintf('COM_EASYSOCIAL_TOOLBAR_YOUR_FRIENDS', $Friend, $Dudes);

COM_EASYSOCIAL_TOOLBAR_YOUR_FRIENDS="Variables are: %s and %s";

...something like that. I dont know about code. But there's gotta be a way to do something like that? Anyway, this is super low priority as Im sure its probably 1/1000 people who dont want to use the word friend.
·
Sunday, 29 December 2013 02:56
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Marco,

I think this would only complicate things even further because the idea of a language file is to maintain the ability to have multiple languages on a site. If you are going to store this term "friend" as a variable, there's no way to translate this again.
·
Sunday, 29 December 2013 15:24
·
0 Likes
·
0 Votes
·
0 Comments
·
Can you not use PHP in the file? Like declare some variables

$friend = friend
$friend_plural = friends

COM_EASYSOCIAL_TOOLBAR_YOUR_FRIENDS = Your $friend_plural

Something like that, or some sort of mixin type principle in language files would make translations and modifications easier. Anyway, like I said this isn't a big issue, I was just curious.
·
Sunday, 29 December 2013 21:12
·
0 Likes
·
0 Votes
·
0 Comments
·
Yes, that makes sense but all the language string is going to be extremely complicated. For instance,


JText::sprintf( 'SOME_TRANSLATION_FOR_FRIENDS' , JText::_( 'COM_EASYSOCIAL_FRIENDS' ) , $user->getName() );


And within SOME_TRANSLATION_FOR_FRIENDS , you have to define it as "You are now %1s with %2s . It makes translating much more difficult. Again, since this request is probably a very uncommon one, it can still be solved by overriding your translations
·
Sunday, 29 December 2013 21:59
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post