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.
thanks for your reply
I need to display load more button text in multilingual :
“Load more”
“استعراض المزيد”
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
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 9 years, 8 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 9 years, 8 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...";
}