Categories
Polylang

A Slight Irritation About Polylang and Media Handling

So, I use a plugin called Polylang to help me maintain a multilingual WordPress site. In my experience, it has a better user experience than WP-ML, though it does have some teething problems. For example, I was creating a Hebrew version of my Photo Gallery page to demonstrate the ease of language switching in relation to a previous post I wrote. However, none of the images I had uploaded were appearing in my Media Library.

The problem has a solution: you need to create a version of the page for each language you intend to use it in. This doesn’t mean you have to upload it one time for each and every language. Here’s how you do it:

Step 1: Go into the picture in question

At the bottom right-hand corner of the modal window, you should see a link that reads “Edit more details”. It is sitting in between between “Delete Permanently” and “View Attachment Page”. Click “Edit more details”.

Step 2: Find the language and click the “plus” icon next to it

In the right-hand sidebar, there should be a list of the languages you added, along with a dropdown menu to select the language this picture should be in. Click the language you want to add details for. For the purposes of this tutorial, I’ll select “Esperanto”.

Step 3: Fill in the appropriate metadata for the image and hit “Update”.

Basically, update the title of the media object in question, modify the alt-text and hit “Update”. With this, you should be done for the language you want to add.

Some final notes

You’ll have to repeat steps 2 & 3 for each additional language you want to add a media object for. Please be aware that this doesn’t mean that there are multiple copies of the file residing on the server. These are added in WordPress’ database as a custom post type so that when you use them across the site, it can take the alt text, title, etc you assigned to this image and reuse that metadata on other instances. Having localized alt text just makes it more useful is all.

Now, when you have “Show all languages” selected in the top menu bar, you’ll see multiple copies of the asset you added metadata for in other languages. Like this:

My media library has also grown to include the screenshots from this article.

You can check if multiple copies were uploaded for the same language by going to the top menu bar to “Show all languages” to see only assets with data in one language.

In this instance, I’ll select “Esperanto”. And here are the just the images with metadata in Esperanto.

Also, add appropriate metadata to your image. You’ll thank yourself later when you don’t have to hunt down an image you previously uploaded.

It’s worth noting that you can choose in the Polylang settings not to link media posts to a language. However, I think given the necessity of having alt text for the sake of accessibility, it’s still a good practice.

Categories
Israel WordPress

Why Israel Needs a Great i18n-Focused WordPress Agency

Looking at several websites and thinking about making aliyah, I have come to one conclusion. There’s a serious need for a great internationalization (i18n)-focused WordPress Agency. I mean, when I think about the logistics of moving, what do I need to do? Well, the first thing I need is a cellphone. The only two Israeli cellular companies that offer service to the iPhone and Apple Watch are Pelephone and Partner. There’s just one problem, though…

Yeah. Their websites are virtually only in Hebrew. Pelephone doesn’t have an English version of their site. Partner, while having a version of their home page in English, basically has the rest of their site in Hebrew.

It’s not just cellular carriers

To this date, the only Israeli website I’ve seen that does i18n well is the Israeli government’s website, gov.il. While not all websites are translated into every language on the site, at least it appears someone tried.

However, most Israeli websites appear to have broken i18n when it is implemented, or at least the barebones version. For example, Nefesh B’Nefesh’s website appears to have a language switcher. Clicking the American flag in the upper-right-hand corner shows Spanish, French, Israeli, and Russian flags. However, clicking on those flags does… nothing. You might think that the JavaScript broke by clicking on it. However, looking at the source code in the Inspector shows me this:

A whole boatload of nothing. I’m not sure if this is because they don’t have their content ready or if it’s something else. Looking at the HTML rendered, it looks like they use WordPress. There is an amazing plugin for i18n called “Polylang” that allows you to translate your content into multiple languages.

Having said that though, I don’t think Nefesh B’Nefesh is using their assets and platform to their greatest advantage. I decided to dig deeper and what I found was most disheartening. They’re using a page builder to build their Community Profiles. Now, is this a bad thing? Not necessarily. Though, they do generate a lot of needless crap in their code that makes your page’s HTML less semantic.

What can be done?

I don’t mean to beat up on Nefesh B’Nefesh, they do great work as a charity. But your website needs to work for you. It needs to be easy to update, semantic, and accessible. Your website needs to be an asset for your company. To quote a certain video from Madwire Media in Fort Collins, it’s all about “conversions”. To paraphrase Michael Hyatt in his book Platform, your website is your home and it is where you build your brand and rally your tribe. Whether your goal is to get someone to make the first step to make aliyah or to sign up for a cellphone plan, you build a website to reach people and get them to do something.

This is why Israel needs a great i18n-focused WordPress agency. Because better websites can help so many people.

Categories
WordPress

The Usage of White Space in Twenty Twenty

So, WordPress 5.3 came out today. It came bundled with a new default theme called “Twenty Twenty”. This is the ninth default theme to be shipped with WordPress since “Twenty Ten” was announced. WordPress has created a new one every year since 2010, except in 2018. It’s also the second default theme to come out with Gutenberg in mind. Most of the others were updated to take advantage of Gutenberg blocks in varying degrees.

However, this post isn’t about all that. This post is about how Twenty Twenty uses white space. Moreover, it’s about how much I hate how they use white space. While I normally use the “Full Width Template” for everything, archive and category pages aren’t on the ball with that, evidently.

I’m planning to do some sort of redesign within the next year, but for the sake of posterity, this is how it currently looks:

So, why did I update?

Because, the alternative was much worse.

Twenty Nineteen and crimes against design

I’m not a fan of Twenty Nineteen. Much less than I am a fan of Twenty Twenty. Because when you set a “featured image” for a post, the page turns out looking like this:

Now, I’ll be the first to admit that I’m not the best at design. But I do have a sense of it, and I gotta say – this being the default for every page that you have with a featured image and every blog post? I’m not about that. So, it was necessary to upgrade.

This also tells me that we need to step up the quality of both FOSS and premium Gutenberg themes.

Categories
Uncategorized

How to setup Let’s Encrypt on NearlyFreeSpeech.Net

The documentation on the NearlyFreeSpeech.Net site is lacking and it’s tough to find this information. So, to kick off this blog, I’ll tell you the short and sweet way to set up Let’s Encrypt on NearlyFreeSpeech.Net.

Step 1: Log in to your site via SSH

You can find most of the details on in the Member area. There is an area on the site page for the site in question that tells you the username to log in with and the host to connect to, as well as whether or not SSH/SFTP access and FTP access are currently enabled. On Linux and MacOS X-based systems, it’s ridiculously easy to connect. Just launch your Terminal app of choice and run this command:

ssh your_username@your_hostname

Obviously, you’ll replace your_username and your_hostname with the username and hostname. However, if you’re on Windows, you’ll need a POSIX shell or a SSH terminal. Amazingly, in Windows 10, you can actually install a Linux shell to run Linux programmes. It’s like Wine in reverse. However, if you just need SSH, I’d recommend PuTTY both as a Linux SysAdmin and having friends who code PHP in Windows.

Step 2: Run tls-setup.sh

Really, it’s simple. Once you successfully log in using your NearlyFreeSpeech.Net password, you’ll be dumped into a command prompt that looks like this:

[vbdotfr /home/public]$

Type the following command:

tls-setup.sh

That’s it. No parameters, nothing additional, just:

tls-setup.sh

Once you do that, you’ll be asked a question or two. Answer them. This is the second easiest implementation of Let’s Encrypt I’ve ever seen. The honour of the first being on Flywheel, but this is so painless that it beats out SiteGround.

Step 3: Enjoy the nice SSL goodness

Finally, enjoy the nice SSL goodness. Feel good knowing that you’re contributing to a web that is more secure. I know that for most people, this is just a way to avoid getting dinged by the almighty algorithm. However, we all have a duty to contribute to the security of the Internet. I’d recommend keeping up the good karma. Use the Mozilla Observatory to see how you can further tighten your site’s security with HTTP headers. Additionally, take further steps to lock down your website. If you’re using WordPress, NearlyFreeSpeech.net has a list of ways to further secure and optimize your site.