Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

How do you customize the English phrases?

I'm running v1.10 (901e5ea), but I don't think that really matters, because this is a very basic question...

I want to change the wording in a number of spots that aren't covered by templates - the "thanks for registering" email, for instance. Best as I can tell, this can't be done through templates (right?). In looking at the code, I found that there are references in a couple of places - in the i18n > en_US > templates folders, and in the relevant PHP code for whatever I'm changing.

However, changing values in either of those places didn't seem to change what I see in any way - even after clearing browser and server caches.

Help?

-rob.

Comments

  • "I'm running v1.10 (901e5ea), but I don't think that really matters, because this is a very basic question..."
    Of course the version matters... where to change things in the code changes on a per version basis.

    Q: 
    the "thanks for registering" email, for instance.
    A: Do you mean:
    Agents: Admin panel -> Settings -> Agents -> Templates -> Agent Welcome Email?
    Users: Admin panel -> Settings -> Users -> Templates -> Account Confirmation Email?

    If you are referring to something else then you will need to be more specific.  Most of the English language stuff is in \include\i18n\en_US.  Not all of it... since the translation feature has never been announced as completed.
  • Sorry, overlooked the fact that the structure has changed over versions. 

    OK, that's exactly what I was looking for, thanks! I didn't even think that there were templates anywhere other than in Admin > Email > Templates. That tab in Users totally slipped past my eye.

    thank you!
    -rob.
  • I realize I left out half my question before. Your answer takes care of the email template. But what about bits like this in the PHP:

    $button = __("Email Access Link");

    I'm about 99% certain that this is customizable text through a language file, isn't it? If I want to reword that, but still in English, is that possible without editing the PHP directly?

    thanks;
    -rob.
  • Take a peek at: \include\i18n\en_US
  • I'm aware of that file for templates, but specifically to the example above, if I don't want it to say "Email Access Link," is my only solution to modify the PHP? I did a string search on Email Access Link across the entire package, and it's only referenced in accesslink.inc.php.

    The more general version of the question is if I only find the text I want to modify within the PHP files, then that's where I have to modify it, is that correct?

    -rob.
  • Templates are stored in the Database.
    English translations for everything else are stored where I indicated.  I'd recommend that you make a copy of the english language and make your own English pack with your custom strings..
    You should not have to touch the core files for most things.
  • I hate to be an idiot, but I'm an idiot: I cannot find anything like what you are referring to. I'm very good at learning once I know what I need to do, but in this case, I cannot fathom which specific file I need to edit to change the words "Email Access Link." I have grepped every file in the i18n directory, and that phrase does not exist. I opened every file manually and searched, just to be sure. The phrase is not there. 

    The same is true for all the language I want to modify: I cannot find a single entry in any file in the i18n folder that specifies a "translation" for those words.

    If you could point me to one specific example, i.e. Email Access Link, and exactly which file I need to modify to change that text, I'm sure I can figure out the generalities from there. But as it is now, I don't know what to change because I can't find anything that looks remotely like that phrase in the i18n files.

    thanks for your help so far.

    -rob.
  • Then what you are trying to edit is probably in the database:

    Admin panel -> Emails -> Templates

    -or-

    Admin panel -> Settings -> Agents
    Click on the Template tab

    -or-

    Admin panel -> Settings -> Users
    Click on the Template tab
  • edited March 16
    Thanks, but I've looked in all those spots, too. They are just templates for messages that are sent to users. I'm trying to modify the text that appears on actual web pages, ie. the example of Email Access Link is the text that appears on the "Check Ticket Status" web page.


    I want to change the button text. Based on what you've told me, and what I've seen in the files, I'm now pretty certain I'm doing it the only way possible, via direct PHP changes.

    thanks;
    -rob.
  • edited March 16
    Here's an example; I changed the upper two fields by modifying the source code before thinking to ask about it. But I think I'm doing it the way I have to do it.


    -rob.
    example.png
    790 x 464 - 35K
Sign In or Register to comment.