admin管理员组

文章数量:1129123

My setup

I have a custom PHP application that uses po/mo files in a locale directory to provide translations for the website strings. All works perfectly. I have Wordpress installed in a sub-directory (/articles). My Wordpress template includes components from the app above it eg:

<?php include_once( $_SERVER['DOCUMENT_ROOT']."/shared_assets/navigation.php"); ?>

What I tried

I have installed WPML String Translation. My plan was to scan the theme, and import the po file I already have, but of course the WPML scan cannot "see" the included files from the main app above it. At this point I think I have started down entirely the wrong path.

My question

What is the best technique for translating Wordpress templates in a subfolder style installation?

本文标签: plugin wpmlHandling gettextstring translation when WP is installed in subfolder