function setType($elementname, $paramtype) {
        $this->_types[$elementname] = $paramtype;

        // This will not always get it right, but it should be accurate in most cases.
        // When inaccurate use setForceLtr().
        if (!is_rtl_compatible($paramtype)
                && $this->elementExists($elementname)
                && ($element =& $this->getElement($elementname))
                && method_exists($element, 'set_force_ltr')) {

            $element->set_force_ltr(true);
        }
    }