Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • wops. at the end the “” and “” in code, just missplace! (and i cant edit my reply, sorry)

    function qtranxf_use_content($lang, $content, $available_langs, $show_available=false, $show_empty=false) {
    ....
    	if(!$show_available){
    		if ($q_config['show_displayed_language_prefix'])
    			return '('.$q_config['language_name'][$alt_lang].') '.$alt_content;
    		else
    			// return $alt_content;
    			return ''; // if no content at current language, show NOTHING!
    	}
    ....

    ACF 4.4.10
    ACF qTranslate: 1.7.9
    qTranslate-X 3.4.6.8

    My problem is almost same.
    I check the options for “Hide Content which is not available for the selected language. ” but if the ACF fields value empty in the current lang, it still displayed at fronted, but now with the secondary language value.

    in qtranslate Settings > General Untranslated Content

    uncheck “Show displayed language prefix when content is not available for the selected language. ”

    after this, the acf fields still there but now withouth prefix.

    I managed to hide it completely.
    Found a temporary fix (until the next update). Not the best, but maybe help for someone.

    qtranslate_core.php around 1476 line.

    function qtranxf_use_content($lang, $content, $available_langs, $show_available=false, $show_empty=false) {
    ....
    	if(!$show_available){
    		if ($q_config['show_displayed_language_prefix'])
    			return '('.$q_config['language_name'][$alt_lang].') '.$alt_content;
    		else
    			<strong>// return $alt_content;</strong>
    			<strong>return ''; // if no content at current language, show NOTHING!</strong>
    	}
    ....

    i modified the return value to empty.
    Its now working for me. If the current langauge has empty value, show nothing!

Viewing 2 replies - 1 through 2 (of 2 total)