Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author craigramsay

    (@malinkymedia)

    Hi, I’m not sure what you mean. The plugin does have language files so the settings and initially text for the button can be translated.

    Thread Starter wesam2003

    (@wesam2003)

    thanks for your reply

    I need to display load more button text in multilingual :
    “Load more”
    “??????? ??????”

    Plugin Author craigramsay

    (@malinkymedia)

    The plugin can be translated if you wanted to do that and then define the language of your site from the WordPress settings. However I guess you mean you want it change based on different visitors. In that case take a look at some multilingual plugins, there seems to be quite a few available.

    Thanks

    Thread Starter wesam2003

    (@wesam2003)

    thanks
    I mean change this in front-end not back-end
    https://www.dropbox.com/s/mc3g6stnpjrl4lj/2016-05-18_1614.png

    Plugin Author craigramsay

    (@malinkymedia)

    The load more text can be changed from the settings. This could be written in any language but only one language at a time. The plugin couldn’t swap the text based on the user. As mentioned you’d need to investigate a multilingual plugin.

    I’m marking as resolved as this feature wouldn’t be implemented.

    Thanks

    I wonder same thing.
    .po, .mo, .pot files dont have this string “Load More Posts” to translate.

    • This reply was modified 8 years, 5 months ago by Stagger Lee.

    Ah, cannot lose more time on it. Decided to fix it most simple way.

    – Added language class to BODY.
    – With CSS “:after” selector change text when language is changed.
    – Delete “Load More Posts” and “Loading…” in plugin settings, leave it empty.

    Here it is, if it can help someone.

    /* Adding a language class to the body to apply styles individually per language */
    add_filter('body_class', 'append_language_class');
    function append_language_class($classes){
    $classes[] = 'language-'.ICL_LANGUAGE_CODE; 
    return $classes;
    }

    CSS:

    .language-en .malinky-load-more a:after {
    	content: "Load More Posts";
      }
    .language-de .malinky-load-more a:after {
    	content: "Mehr Beitr?ge laden";
      }
    • This reply was modified 8 years, 5 months ago by Stagger Lee.

    Here is a bit better code to include “Loading…” string in right way.

    .language-en a.malinky-load-more__button:after {
    	content: "Load More Posts";
     }
    .language-de a.malinky-load-more__button:after {
    	content: "Mehr Beitr?ge laden";
     }
    .language-en a.malinky-load-more__button-disable:after {
    	content: "Loading...";
      }
    .language-de a.malinky-load-more__button-disable:after {
    	content: "Laden...";
     }
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How to make text multilingual’ is closed to new replies.