how to change localization
-
hello,
is there a way o change the localization somehow to de_DE?
thanks π
-
Hey dos81,
German isn’t currently supported, but I’ll put that in the next release.
Look out for it in the next release within the next week or so. π
Kind regards,
Dylan
Just finished the German translation.
I’ll be testing this on a local install & pushing an update later this week. π
Kind regards,
Dylan
thanks for you effort! π
didn’t think you had to translate yourself. had hoped you could somehow implement some kind of “locale” variable/option and get the info from FB themselfes so any language will work. but for me, german is sufficent π
if you need something translatedt to german for this, let me know.
Hmm, I’m having trouble getting the language to change to german.
If you are comfortable with GitHub, check this out: https://github.com/irkanu/simple-facebook-page-widget/blob/master/simple-facebook-page-plugin.php#L75
I’m not 100% confident that function is correct.
I’ll keep working at this, but until that issue is resolved language translations are on hold.
are you sure you have to use the wordpress plugin translation stuff?
you somewhere include this i think:
<script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_EN/sdk.js#xfbml=1&version=v2.3"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script>if you just switch the “en_EN”-part of the javascript source to “de_DE” the buttons would be translated directly (or whatever languages i.e. “nl_NL” for netherlands -> https://en.wikipedia.org/wiki/List_of_Internet_top-level_domains#Country_code_top-level_domains)
edit: its in the pluginroot/js/simple-facebook-page-root.js file in line 12 the “en_US”. i’m not a programmer but maybe something like
var Language = "en_US"; if (LanguageVariableThatCanBeDefinedByTheUser!="") {Language = LanguageVariableThatCanBeDefinedByTheUser}Hmm. I think I see what you are saying.
See this image: http://imgur.com/TingDi6
Let me know if that’s what you mean. π
If so, I can totally do that & will probably implement that. π
yeah, thats exatly what i was looking for! π
Perfect!
I’m glad we’re on the right track.
I’ll need to localize the javascript – https://codex.ww.wp.xz.cn/Function_Reference/wp_localize_script
I’m pretty busy at work this week, but I’ll have some free time this weekend to play with it.
I’ll try to add a setting in the widget & parameter in the shortcode to allow you to choose which language the feed outputs.
so no easy “changing the variable in the JS-file” then… π
thanks for your efford! take your time. it’s not that important… π
You can definitely edit the JS file to accomplish this, but if you update the plugin you will lost that customization.
Edit this line:
js.src = "//connect.facebook.net/en_EN/sdk.js#xfbml=1&version=v2.3";Change en_EN to de_DE to replicate the image I sent you.
That will hold you over until it’s integrated into the plugin. π
I’m back!
I’ve updated the plugin and added 135 languages – wow! π
Don’t forget to update your plugin or download the latest copy from the repository.
The options page to set your language is under “Settings”
Let me know how it is & don’t forget to take a few seconds to leave a review, if you feel like I’ve helped. π
https://ww.wp.xz.cn/support/view/plugin-reviews/simple-facebook-twitter-widget
works great & review submitted π thanks for the quick help!
The topic ‘how to change localization’ is closed to new replies.