1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Changing Phrases

Discussion in 'XenForo Development Discussions' started by bottiger, Nov 2, 2015.

  1. bottiger

    bottiger Active Member

    I am using XenForo_Model_Phrase to change a phrase through code but it doesn't show up on the forum, but it shows up in the control panel.

    If I edit the phrase through the admin panel it shows up on the forum.

    Here is the code that I tried to emulate from XenForo_ControllerAdmin_Phrase::actionSave.

    $phraseModel XenForo_Model::create('XenForo_Model_Phrase');
    $phrase $phraseModel->getPhraseInLanguageByTitle('field_35_choice_7'1);

    $dw XenForo_DataWriter::create('XenForo_DataWriter_Phrase');
    $changed $dw->isChanged('phrase_text');
    $changed) {
    There appears to be some sort of caching done by new XenForo_Phrase but I am not sure how to clear it.
    Last edited: Nov 2, 2015

Share This Page