Tag: wordpress
Change Paypal language in Buy Me a Beer plugin
by Alessio Placitelli on Jan.26, 2008, under Tips and Tricks
There are so many great plugins for WordPress and Buy Me a Beer is one of them. It enables your blog users to donate you money through Paypal encouraging them with specific phrasing. One of the problems of the current Buy Me a Beer release, is that it doesn’t allow to choose the language of the Paypal donation page. To overcome this issue, here’s the trick: in buy-me-beer.php, look for $paypal_link and $paypal_contentlink variables. They should look like this:
$paypal_contentlink = "https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=".$options['business']."¤cy_code=".$options['currency']."&amount=".$options['amount']."&[...]
$paypal_link = "https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=".$options['business']."¤cy_code=".$options['currency']."&amount=".$options['amount']."&return=".$options['thankspage']."&lc=US&item_name=".str_replace(" ","+",$args['title']);
And add, after the first & in each of the occurrence of the variable, the string lc=US& including the “;”. You can change the language of the page by specifying a different country code instead of US (which stands for United States, so an English page is displayed). Query your favorite search engine for a list of country codes.
Polyglot: how to show both language name and flag
by Alessio Placitelli on Dec.30, 2007, under Tips and Tricks
So here we go with tip #2 for this great plugin. I wanted to show both the flag and the name of available languages on my wordpress sidebar. The function responsible for checking available languages is polyglot_list_langs, which I had to modify a little bit to suit my needs. Ok, let’s stop talking and start coding
Make Polyglot sidebar work with your custom theme
by Alessio Placitelli on Dec.28, 2007, under Tips and Tricks
If you need to publish the work on your WordPress blog in two or more languages, there is a great chance that you will be using Polyglot. It is a great plugin, works nicely and allows to publish multiple translation of your texts. I tried to enable the language sidebar in my theme, but somehow things got weird (the list was misplaced). Digging through polyglot code, I found a way to fix this behavior. Just follow those few simple steps…
(continue reading…)
English