solved translating my site

WebServices
WebServices
@swenmaertin
6 years ago
11 posts
Hi there community,

I'm working on translating my site. Most of the words can be found in the language tab of a module, some of them are in templates, like email texts. But I can't finde some of the words like in the group config. (screenshots)
Any idea were to find these words?
eng.JPG
eng.JPG  •  40KB

ger.JPG
ger.JPG  •  39KB


updated by @swenmaertin: 03/18/19 01:25:40PM
paul
@paul
6 years ago
4,325 posts
Hi - Only 'user facing' words and text strings are translatable.
Any words and text strings seen only by site admin, ie. those in the ACP are hard coded in English so are unchangeable with editing the core modules, which is not recommended.
Sorry.
Paul


--
Paul Asher - JR Developer and System Import Specialist
WebServices
WebServices
@swenmaertin
6 years ago
11 posts
Aren't these words 'user facing'? Since they can create groups and have to accept members.
It's more for profile admins than for site admins or am I wrong?
paul
@paul
6 years ago
4,325 posts
Hi Swen - Sorry, I took a quick look at your screen shots and wrongly assumed that they were ACP views.
The 'Can Create Discussions' text comes from the jrGroupDiscuss_user_config_listener() function in the GroupDiscuss module and that does look to be hard coded. I'll get that fixed up and released asap so that you can then translate it.
The 'Can Create Files' text is again hard coded but in your custom GroupFiles module so I suggest that when I release the GroupDiscuss module, you checkout the changes there with respect to this and apply them to your module.
hth


--
Paul Asher - JR Developer and System Import Specialist
WebServices
WebServices
@swenmaertin
6 years ago
11 posts
Thank you very much Paul.
You're awesome! :)
paul
@paul
6 years ago
4,325 posts
I'm posting the changes here as there are other changes in the module that are still under test so I cannot relese it as yet, so if you make these changes to your current version of the GroupDiscuss module (and your GroupFiles module), you should be ok.

jrGroupDiscuss/lang/en-US.php - add in IDs 36 and 37 =
$lang[30] = 'Success - you are now following this group';
$lang[31] = 'You are no longer following this group';
$lang[32] = 'Group Watch';
$lang[33] = 'When you are watching a group for new discussionss how do you want to be notified?';
$lang[34] = 'started';
$lang[35] = 'replies';
$lang[36] = 'can create discussions';
$lang[37] = 'If checked, this User will be allowed to create discussions in this Group';

jrGroupDiscuss/include.php - replace the jrGroupDiscuss_user_config_listener function with this -
function jrGroupDiscuss_user_config_listener($_data, $_user, $_conf, $_args, $event)
{ // $_data = User Info // $_args = Group Info $lang = jrUser_get_languages(); $val = 'on'; if (isset($_args['group_member']["{$_data['_user_id']}"]['jrGroupDiscuss_config_allowed']) && jrCore_checktype($_args['group_member']["{$_data['_user_id']}"]['jrGroupDiscuss_config_allowed'], 'onoff')) { $val = $_args['group_member']["{$_data['_user_id']}"]['jrGroupDiscuss_config_allowed']; } $_tmp = array( 'name' => 'jrGroupDiscuss_config_allowed', 'label' => $lang['jrGroupDiscuss'][36], 'help' => $lang['jrGroupDiscuss'][37], 'type' => 'checkbox', 'validate' => 'onoff', 'value' => $val, 'default' => 'off', 'required' => true ); jrCore_form_field_create($_tmp); return $_data; }

Hope that helps


--
Paul Asher - JR Developer and System Import Specialist
paul
@paul
6 years ago
4,325 posts
Sorry - wrong language function used :-(
Use this code instead -
function jrGroupDiscuss_user_config_listener($_data, $_user, $_conf, $_args, $event)
{ // $_data = User Info // $_args = Group Info $lang = jrUser_load_lang_strings(); $val = 'on'; if (isset($_args['group_member']["{$_data['_user_id']}"]['jrGroupDiscuss_config_allowed']) && jrCore_checktype($_args['group_member']["{$_data['_user_id']}"]['jrGroupDiscuss_config_allowed'], 'onoff')) { $val = $_args['group_member']["{$_data['_user_id']}"]['jrGroupDiscuss_config_allowed']; } $_tmp = array( 'name' => 'jrGroupDiscuss_config_allowed', 'label' => $lang['jrGroupDiscuss'][36], 'help' => $lang['jrGroupDiscuss'][37], 'type' => 'checkbox', 'validate' => 'onoff', 'value' => $val, 'default' => 'off', 'required' => true ); jrCore_form_field_create($_tmp); return $_data; }



--
Paul Asher - JR Developer and System Import Specialist

updated by @paul: 12/17/18 06:58:40AM
WebServices
WebServices
@swenmaertin
6 years ago
11 posts
paul:
I'm posting the changes here as there are other changes in the module that are still under test so I cannot relese it as yet, so if you make these changes to your current version of the GroupDiscuss module (and your GroupFiles module), you should be ok.

jrGroupDiscuss/lang/en-US.php - add in IDs 36 and 37 =
$lang[30] = 'Success - you are now following this group';
$lang[31] = 'You are no longer following this group';
$lang[32] = 'Group Watch';
$lang[33] = 'When you are watching a group for new discussionss how do you want to be notified?';
$lang[34] = 'started';
$lang[35] = 'replies';
$lang[36] = 'can create discussions';
$lang[37] = 'If checked, this User will be allowed to create discussions in this Group';

Both don't work because the system won't add these language IDs.
updated by @swenmaertin: 12/17/18 07:31:07AM
paul
@paul
6 years ago
4,325 posts
Run the Integrity Check to get the new language strings added in.


--
Paul Asher - JR Developer and System Import Specialist
WebServices
WebServices
@swenmaertin
6 years ago
11 posts
Ah yeah, totaly forgot about that.
Everything is working now. Again thank you very much Paul.

Tags