STATUS ÜBERPRÜFEN
I AM LISTENING TO
|

WPLMS – secure translation files from updates / using Poedit

25. Juni 2015
.SHARE

Table of Contents

WPLMS is a Learning Management System for WordPress. Translation files in WPLMS are located in

  1. /wp-content/themes/wplms/languages/
  2. /wp-content/plugins/vibe-course-module/languages/
  3. /wp-content/plugins/vibe-customtypes/languages/
  4. /wp-content/plugins/vibe-shortcodes/languages/
  5. /wp-content/plugins/wplms-assignments/languages/
  6. /wp-content/plugins/wplms-dashboard/languages/
  7. /wp-content/plugins/wplms-events/languages/
  8. /wp-content/plugins/wplms-front-end/languages/

These language files will be overwritten with new files on every update, destroying any custom translation changes.

THE THEME

Move your theme into a child theme and translate your theme there (/wp-content/themes/your-child-theme/languages/).

Make sure that language files are loaded from your child theme. Add the following action to your functions.php and use „vibe“ as the domain, not the actual theme name.

add_action( 'after_setup_theme', 'my_child_theme_setup' );

function my_child_theme_setup() {
 load_child_theme_textdomain( 'vibe', get_stylesheet_directory() . "/languages" );
}

THE PLUGINS

Use the global language folder for the WPLMS plugin translations. The WPLMS plugin loader checks, if a global language file actually exists :)

 if ( file_exists( $mofile_global ) ) {
        load_textdomain( 'vibe', $mofile_global );
    } else {
        load_textdomain( 'vibe', $mofile_local );
    }
  1. /wp-content/languages/plugins/vibe-de_DE.mo
  2. /wp-content/languages/plugins/vibe-customtypes-de_DE.mo
  3. /wp-content/languages/plugins/wplms-assignments-de_DE.mo
  4. /wp-content/languages/plugins/wplms-dashboard-de_DE.mo
  5. /wp-content/languages/plugins/wplms-events-de_DE.mo
  6. /wp-content/languages/plugins/wplms-front-end-de_DE.mo
  7. +++

POEDIT

I suggest using Poedit, as it allows you to do the translation on the Desktop. It also offers options to update your file with an updated WPLMS language file, allowing you to add new translation strings if needed :)

PREPARE

A. Create the structure for the update and download new PO files from WPLMS

  1. /wp-content/themes/wplms/languages/
  2. /wp-content/plugins/vibe-course-module/languages/
  3. /wp-content/plugins/vibe-customtypes/languages/
  4. /wp-content/plugins/vibe-shortcodes/languages/
  5. /wp-content/plugins/wplms-assignments/languages/
  6. /wp-content/plugins/wplms-dashboard/languages/
  7. /wp-content/plugins/wplms-events/languages/
  8. /wp-content/plugins/wplms-front-end/languages/

B. The target structure / your current language files

  1. /wp-content/themes/your-child-theme/languages/de_DE.mo /.po
  2. /wp-content/languages/plugins/vibe-de_DE.mo /.po
  3. /wp-content/languages/plugins/vibe-customtypes-de_DE.mo /.po
  4. /wp-content/languages/plugins/wplms-assignments-de_DE.mo /.po
  5. /wp-content/languages/plugins/wplms-dashboard-de_DE.mo /.po
  6. /wp-content/languages/plugins/wplms-events-de_DE.mo /.po
  7. /wp-content/languages/plugins/wplms-front-end-de_DE.mo /.po
  8. +++

C. Open your current .PO file from target structure

portalZINE.DE | portalzine nmn development meets creativity uncategorized 5

D. Update with new and matching .PO file from A. (Catalog -> Update from POT file)

This will check for new or obsolete strings and update your language file.

portalZINE.DE | portalzine nmn development meets creativity uncategorized 7
portalZINE.DE | portalzine nmn development meets creativity uncategorized 8

E. New strings added

portalZINE.DE | portalzine nmn development meets creativity uncategorized 9

F. Obsolete strings removed

portalZINE.DE | portalzine nmn development meets creativity uncategorized 10

G. Save and upload updated .PO + .MO files from target structure to server.

Again, make sure to use the global language folder and the child theme languages folder !

Panic time after updates is over :)

Enjoy coding ….

Let’s Talk!

Looking for a reliable partner to bring your project to the next level? Whether it’s development, design, security, or ongoing support—I’d love to chat and see how I can help.

Get in touch,
and let’s create something amazing together!

RELATED POSTS

Here’s the thing about the macOS menu bar: Apple gives you zero control over it. Your apps just pile in from the right, squeezing together like commuters on a rush-hour train, and you either live with it or you don’t. There’s no padding, no grouping, no breathing room. Just a wall of tiny icons staring […]

PDF operations are one of those recurring pain points that never fully go away. You need to fill a contract template, strip and rewrite document metadata before archiving, generate an invoice from an HTML template, and stamp every page with a branded header. The default answer is a SaaS API subscription that charges per document […]

Generating PDFs on a server is one of those tasks that sounds simple until you actually sit down to do it. HTML-to-PDF rendering drifts between browsers, LibreOffice headless mode is finicky to install, and most SaaS solutions charge per page once you hit volume. Gotenberg solves this cleanly: a single Docker container that bundles headless […]

Alexander

I am a full-stack developer. My expertise include:

  • Server, Network and Hosting Environments
  • Data Modeling / Import / Export
  • Business Logic
  • API Layer / Action layer / MVC
  • User Interfaces
  • User Experience
  • Understand what the customer and the business needs


I have a deep passion for programming, design, and server architecture—each of these fuels my creativity, and I wouldn’t feel complete without them.

With a broad range of interests, I’m always exploring new technologies and expanding my knowledge wherever needed. The tech world evolves rapidly, and I love staying ahead by embracing the latest innovations.

Beyond technology, I value peace and surround myself with like-minded individuals.

I firmly believe in the principle: Help others, and help will find its way back to you when you need it.