Is it possible to override a framework language file by creating a plugin?

Hi There,
I've started using a new framework that comes packaged within a theme. I'd like to change some of the wording of the labels within the framework and it seems the easiest way to do this would be by editing the language file. The obvious issue being, when I come to update the theme/framework, the language file I've edited will be over-riden.

I'm wondering, is it possible to either:
a) Create a plugin that contains a revised language file that essentially overrides the existing language file....if so, how can I make it so that wordpress uses my language file within the plugin, rather than the theme language file
b) I notice the theme doesn't have a en_UK language file, just an en_US (which is the one I edited) - would another option be to create an en_UK file (again, packaged in a plugin) and switch my WP language to english (which is where i'm from anyway, so it'd be more appropriate).

Any thoughts on the above would be really handy,

  • Sajid

    Hi @Sam

    Hope you are doing good today :slight_smile:

    For language files you should not need to create a whole plugin. WordPress takes care of it by default.

    Just move the translated files to wp-content/languages/themes folder for themes and wp-content/languages/plugins. Create these folders if not exist in following hierarchy.

    - languages
    -- themes
    -- plugins

    Now these files will never be overridden when you update theme/plugin and WordPress will always load these files for translations.

    Take care and have a nice day :slight_smile:

    Cheers, Sajid

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.