Language file

The recommended method of customizing your AppGini-generated application is through hooks. But sometimes you might need to add functionality not accessible through hooks. You can discuss this here.
Post Reply
bescott53

Language file

Post by bescott53 » 2019-11-27 12:55

Hi board, looking in the language file, at the membership profile translations:

Code: Select all

$Translation['Hello User'] = 'Hello %s!';
how do i change this to show the custom 1 entry, where do i find the variables used. I looked into the /admin/incFunctions.php but couldnt see it in there.

User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 1156
Joined: 2019-05-21 22:42
Location: Germany
Contact:

Re: Language file

Post by onoehring » 2019-11-27 15:09

Hi,

why not simply add your line to it?
(Code not tested)
Somewhere in your code add

Code: Select all

$Translation['Hello User'].= '\nThis is your new line';
Notice the .= which should add to the current string the new text.
\n should create a new line

Olaf

bescott53

Re: Language file

Post by bescott53 » 2019-12-01 18:49

Olaf, not sure I understand your suggestion. the variable used in the language file %s is for the username. I do not see how hard coding a line of text will give me the custom1?

Code: Select all

'Hello %s!'

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: Language file

Post by pbottcher » 2019-12-01 21:18

Hi,

this is not possible, as the %s is just replaced by the username.

If you want to change that you need to edit the membership_profile.php around line 116.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

Post Reply