Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Prisna

    (@prisna)

    Hello,

    you should modify the flags template by going to:

    Advanced > General > Templates > Flag template

    Replace the current content with:

    <td class="prisna-gwt-flag-container prisna-gwt-language-{{ language_code }}">
    	{{ language_name }}
    </td>
    

    Regards

    Hey,

    I also want a similar setup. I tried your code and it did work but was not what i was looking for since all the language names were in english.

    I want an inline display of the languages in their native text styles.

    Is it possible to do such a thing?

    Kind regards

    Plugin Author Prisna

    (@prisna)

    Hello,

    yes, it’s possible to modify the names dynamically. You may try:

    1) Advanced > General > Templates > Flag template:

    < l i class="prisna-gwt-language-container prisna-gwt-language-{{ language_code }}">
    	< a href = " javascript:;" on click="PrisnaGWT.translate('{{ language_code }}'); return false;" title="{{ language_name }}">{{ language_name }}</ a >
    </ l i >
    

    * Remove the spaces in the tags. HTML markup gets truncated if written correctly.

    2) Advanced > General > Javascript callbacks > On after load:

    var TranslatorLoader = {
    	change: function() {
    		jQuery(".prisna-gwt-language-es a").text("Espa?ol");
    		jQuery(".prisna-gwt-language-de a").text("Deutsche");
    	},
    	testLoaded: function() {
    		var container = jQuery(".prisna-gwt-flags-container");
    		if (container.length > 0)
    			TranslatorLoader.change();
    		else
    			setTimeout(TranslatorLoader.testLoaded, 100);
    	}
    };
    TranslatorLoader.testLoaded();
    

    * Notice the code lines that set the Spanish and German languages names to Espa?ol and Deutsche respectively. You may change other languages names in the same way.

    3) Advanced > General > Custom CSS:

    .prisna-gwt-language-container {
    	list-style: none !important;
    	display: inline-block;
    	margin: 0 2px 0 0 !important;
    	padding: 0 !important;
    	border: none !important;
    }
    
    .prisna-gwt-language-container a {
    	color: #444;
    }
    

    Regards

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘how to remove flag and only replace language text’ is closed to new replies.