Override language.php in child theme

This topic contains 5 replies, has 2 voices, and was last updated by  Alex Rollin 5 years, 10 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #436740

    Robert Slaker
    Full Member
    Post count: 27

    Hello,

    I was looking for a way to change the Favorite button text that shows up in the geodirectory listings. After a quick search I was able to find the solution in the support forum. My follow up question is how do I add these changes to my child theme so they are not overwritten when the geodirectory plugin is updated.

    I know how to add template files to the child theme, but are you able to do the same with the languages.php file?

    Thank you in advance for your help.

    #436748

    Alex Rollin
    Moderator
    Post count: 27815

    Translation files placed in the wp-content/languages/plugins and wp-content/languages/themes folder will not be overwritten. All translation files in use should be placed there.
    https://wpgeodirectory.com/docs-v2/translation/overview/

    #436926

    Robert Slaker
    Full Member
    Post count: 27

    Thank you for the quick reply.

    I have two follow up questions.

    1. Does the file path that you provided need to be identical on my side (i.e. a languages folder directly inside the wp-content folder?)

    2. The guide that you linked to only discusses .po and .mo files. I was not able to successfully change the string that I wanted to target with those files, but I was able to make the right changes in the languages.php file. Can I also store the languages.php file in the same place that you mentioned and it will not be overwritten?

    #436927

    Alex Rollin
    Moderator
    Post count: 27815

    1. Yes, as stated in the doc (which also have a link to our blog post about the change in WP).

    2. The string is in the core plugin file and may also be in your theme (or parent theme) translation file, or even in an addon. It is a string that is commonly overriden. You can share a link to the site and wp admin if we need to check the settings. Just make a reply here and mark it as private and only our team will be able to read it.

    #437053

    Robert Slaker
    Full Member
    Post count: 27

    Figured it out. Thank you for your help Alex.

    #437079

    Alex Rollin
    Moderator
    Post count: 27815

    Excellent! Hope your translation goes well 🙂

Viewing 6 posts - 1 through 6 (of 6 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket