language back to default language after Ajax reload To simplify the question and maybe reproduce the problem, I made a simplier version of what I am doing. I have a form field with ajax. When it triggers it reloads a small piece of html. In it is t('text in one of tree languages'); If I open the page for the first time the same html is loaded and it is in the correct language. But after the reload from the ajax call it is in the website's default language. This only happens when logged in. It is possible that this has to do with the administrator language module. Any help would very much be appreciated.

Ajax Code at hook_form

function hook_form($form, &amp;$form_state) {
  $form['update'] = array(
    '#value' =&gt; t('Update'),
    '#type' =&gt; 'button',
    '#ajax' =&gt; array(
              'callback' =&gt; 'callback_function',
              'wrapper' =&gt; 'div-to-replace',
              'method' =&gt; 'replace',
              'effect' =&gt; 'fade')   
  );

  // Other form elements

}


Ajax callback function

function callback_function($form, $form_state) {
    return t('test string that should get translated');
}
The ajax callback should return the dynamic form element (and not directly the value). I've created some sample code where the translated content / string is correct after an ajax reload.

function YOURMODULE_form($form, &amp;$form_state, $file_group)
{
    $form['update'] = array(
        '#value' =&gt; t('Update'),
        '#type' =&gt; 'button',
        '#ajax' =&gt; array(
            'callback' =&gt; 'YOURMODULE_form_ajax_cb',
            'wrapper' =&gt; 'ajaxWrapper',
            'method' =&gt; 'replace',
            'effect' =&gt; 'fade'
        )   
    );

    $form['ajax'] = array(
        '#type' =&gt; 'container',
        '#attributes' =&gt; array(
            'id' =&gt; 'ajaxWrapper',
        ),
    );

    $form['ajax']['text'] = array(
        '#type' =&gt; 'markup',
        '#markup' =&gt; t('My translated string'),
    );

    // Rest of the form
}

function YOURMODULE_form_ajax_cb($form, &amp;$form_state)
{
    return $form['ajax'];
}