I do know how to get the current language into a variable. With MODx PHP code normally lives in snippets
. You can’t put your PHP code directly in your document template, but you can create a snippet for it and put it in that. Imagine that your snippet is called [tt]mymenu[/tt]. Then you would include the snippet in your template like so:
I have added one parameter to pass the language id into the snippet. If YAMS is installed correctly the variable [tt]$id[/tt] will become available within the snippet and YAMS will ensure that [tt](yams_id)[/tt] evaluates to the id of the current language. For the snippet code you could then use:
include $id . '_menu.php';
MODx gives you the flexibility implement your site like you want, so you could use that approach if you wish. However, you would miss out on all of the features of the Wayfinder snippet, so it would be good if we could work out why Wayfinder + YAMS extension is not working for you.