$language = !empty($spfconfig['language'])
? $spfconfig['language'] . ':'
: '';
/* allow different language than used in Manager */
if (!empty($spfconfig['language'])) {
$modx->setOption('cultureKey', $spfconfig['language']);
}
$modx->lexicon->load($language . 'spform:default');$language = !nl($spfconfig['language'])
? $spfconfig['language'] . ':'
: '';
or maybe
$language = !empty($spfconfig['nl'])
? $spfconfig['nl'] . ':'
: '';This question has been answered by BobRay. See the first response.
&language=`nl`
&language=`[[*yourLang]]`
&language=`[[getMyLanguage]]`
If you have different contexts for different languages, you could set your cultureKey system setting on the contexts, and it will use that one without having to hack spform or pass the &language option.
At any rate I don't see why you would need to change the spform snippet? Try again with the &language property (or context settings) and if that doesn't work, post the exact snippet call.
Yes I tried by putting the &language property in the snippet call, but it leads to the form not appearing on the page anymore.
[[!SPForm? &language=`nl`]]
Quote from: d_u_n. at May 19, 2013, 03:53 AMYes I tried by putting the &language property in the snippet call, but it leads to the form not appearing on the page anymore.
That should work. I wonder if you just had an error in the tag (like leaving out the question mark or not using back-ticks).
[[!SPForm? &language=`nl`]]