How to make your website multilingual. Case study part 1: Select a method

Planning to add more language versions to your website? This is a step-by-step guide on how to do that. A real project we completed partially pro bono as a Christmas gift for a charity organization will serve as an example.

How to make a website multilingual. On an example of a real implementation of the Onkobieg registration website.
Two language versions of Onkobieg registration website – English version is still in the testing phase.

This mini-series of articles outlines:

  1. How to select the appropriate method of adding support for multiple languages to your website (below).
  2. What common difficulties you may expect when going multilingual.
  3. Key things to keep in mind when translating a website.

Step 1. Select the appropriate multi-language solution for your website

Before you start translating, take a moment to consider which method is best for your website.

We had 3 implementation models to choose from when taking on the Onkobieg (Oncorun) registration website CMS. Learn about the advantages and drawbacks of different solutions.

A. Copying the entire website

Procedure:

Copy the source code and the database. Launch the website under a different address and replace all text content with translations.

Advantages:

  • Simplicity. This solution is the simplest and quickest to implement.
  • No changes to the database. There is no need to modify the database – simply make a copy of it.
  • Altering text content in templates (e.g. footer content) is easy. Simply edit the content – no tools are necessary to handle multilingualism in templates.
  • Diverse content. Different language versions of the same site can differ from one another – some may have more content, some less.

Drawbacks:

  • Separate databases. Different language versions cannot share data without additional synchronization.
    Example: user accounts. If a user creates an account using the Polish language version, they will have to make another account if they want to use the English version.
  • No linking between subpages. Switching between different language versions of a single resource is more difficult.
    Example: returning to the main page from a subpage. If a user is browsing the Polish version of a subpage, they will be redirected to the home page after switching to the English version instead of staying on the same subpage.
  • Higher maintenance costs. Changes (to templates, database alterations, new functions) must be implemented separately for every language version.

B. Translation of individual database content

Procedure:

Add new language fields to the database (e.g. article title EN, article description EN). Translate the website by filling out the fields with content in the target language.

Advantages:

  • Little tampering with system architecture. Language switching is possible by adding a single global parameter to the website URL.
  • Easy switching between language versions. Every resource in the system exists in all language versions. This means that resource ID is the only thing required to retrieve data in a different language.
  • Single database. All language versions use the same database.
  • Low maintenance costs. Every change to a template affects every language version.

Drawbacks:

  • Identical website content. Language versions must be identical. This means that every resource must be translated into every language.
  • Altering text in templates is difficult. Text content needs to be placed in separate language files.
  • Limited scalability. Every new language version requires additional fields to be added for every resource in the administrator panel.

CSingle system for multiple website versions

Procedure:

Create separate language versions of a website within a single system. Link every website to a separate domain, subdomain or folder in the primary domain. Assign individual resources (e.g. subpages or blog articles) to the appropriate language version of the website.

Advantages:

  • Scalability. Once implemented it significantly simplifies adding new language versions.
  • Diverse content. Different language versions of the same site can differ from one another – some may have more content, some less. No need to translate all content (e.g. archived blog articles).
  • Easy switching between language versions. The database is shared. All language versions of every subpage have a common identifier.
  • Single database. All language versions use the same database.
  • Low maintenance costs. Every change to a template affects every language version.

Drawbacks:

  • Significant tampering with system architecture. Every module needs to be altered so that its resources are assigned to the appropriate site.
  • Altering text in templates is difficult. Text content needs to be placed in separate language files.

Our choice

Onkobieg is a registration website for a running event. It enables users to create accounts, make payments online and generate start cards for printing. The nature of the website makes it impossible to launch an English version using a separate database (method A.).

Ultimately, we opted for solution C. – though it is more labor-intensive, it also scales better and does not require all website content, such as archived posts, to be translated.

We also needed a tool for translating content embedded in the source code, such as content in the templates, notifications and error messages. As Onkobieg uses Laravel as its framework, we used its built-in translation package.


As a result of the changes, a growing number of Onkobieg (Oncorun) attendees from outside Poland will be able to register for the race in English. Thanks to our solution, the organizer will easily add new language versions at any time.

“A partner this involved is difficult to find. The majority of the translation was done free of charge as a Christmas present for the Association. We are very grateful for that!”

Szymon Bubiłek
Board Member, Sarcoma Association

#SidnetDonations: Łukasz for the WordPress Foundation and the Unaweza Foundation

It’s Christmas season and time to play Santa… oh wait, we do that every month. After all, we give gifts to charities and open source developers every month. This time, it was Łukasz Nowicki, our remote Senior WordPress & PHP Developer who selected the most ‘well-behaved’ foundations. Łukasz is living in the Masurian Lake District, where he is working on a project for our UK-based client, THG and UK2 (a THG company).

Which organizations will receive Christmas donations from Sidnet this year?

WordPress Foundation

The WordPress Foundation has been striving to ensure that access to online publishing tools remains free and democratic since 2010. And since it was founded by Matt Mullenweg, the creator of WordPress, it fully reflects the philosophy behind the WordPress platform itself.

It promotes projects and software which:

  • are covered by the GNU Public License,
  • are available free of charge – for everyone and for any purpose,
  • can be modified and re-shared at will,
  • enable users to translate their content into other languages,
  • can make use of plugins to extend their functionality without the need to modify the core software.

“I discovered WordPress in 2005 when I was looking for something which would allow me to set up a blog in an easy way, as such things were not as obvious back then. I tested several different solutions. I knew about the existence of b2/cafelog, as well as its evolution, i.e. b2evolution. But then I learned that another branch of this evolution existed as well. And that branch was, of course, WordPress”, Łukasz recalls.

As of today, WordPress is much more than just a blogging platform. It is a lifestyle. There are 140 WordCamps and 700 different groups organizing regular WordPress-themed meetings around the world. In addition, the website itself offers over 200 language versions, as well as 54,000 free plugins and 3,000 page templates. The entire WordPress platform consists of 350,000 lines of code, a number that amounts to 91 years of development work.

WordPress has not only been Łukasz’s basic work tool, but also a genuine passion, for years. He even provides his own plugins to other users: “My plugins available in the WordPress catalog are utilized by thousands of active websites in various parts of the world. I know that someone somewhere finds my work useful, even though I have no idea who they are or where they live. It truly is an amazing feeling”, our developer added.

Unaweza

The Unaweza Foundation was established by Martyna Wojciechowska, who is known for her TV program called ‘Woman at the End of the World’. The goal of the Foundation is to equalize the social, legal and economic opportunities of women and children from various parts of the world.

The foundation is currently collecting funds to help:

  • albino children from Tanzania who are being hunted and mutilated,
  • children forced to dig through refuse in Mexico due to a lack of better life options,
  • women and young girls who are victims of human trafficking in Romania.

“Tanzania and Mexico may seem quite distant, but Romania certainly is not. Nonetheless, it is Romania that tops the European statistics in regard to the number of children sold into slavery and forced to become sex workers. Unaweza works closely with the Reaching Out Romania organization, which saves women and children from such a cruel fate”, Łukasz said.

The foundation will soon expand its activities to other countries as well, including El Salvador, the Philippines, Bolivia, and Lebanon. Its name comes from the Swahili word ‘unaweza’, which means ‘you can’.

“A long time ago, I had the pleasure to meet Martyna Wojciechowska at the Orlen Trophy 4×4 rally. I support the Unaweza Foundation privately as I find Martyna trustworthy. I am thus very happy that Sidnet will also donate to her cause, according to my wish”, our developer said.

#SidnetDonations: Olga for Creative Commons Polska and hospiCare

She brings a human touch to our team of engineers, translating from technologese into the language of users. Olga is responsible for marketing communication at Sidnet, combining analytical thinking with creativity. The open source and non-profit projects she selected exemplify this.

Discover the human side of technology – projects which our marketing expert considers worth supporting.

Creative Commons Polska

The Polish branch of Creative Commons (CC) – a non-profit organisation which helps adapt copyright laws to the realities of the Internet and promotes open access to culture and research. Creative Commons has been a provider of licences and legal tools for authors of photographs, recordings, books and websites since 2001, giving creators control over how they want to share their work online, and empowering users of shared materials.

4 basic types of CC licences:

Attribution, CC-BY. You can copy, alter, publish and distribute the material under the condition that you indicate the author of the original and the original licence.

ShareAlike, CC-SA. You can copy, alter, publish and distribute the material under the condition that you share it under the same licence as the original.

NonCommercial, CC-NC. You may copy, alter, publish and distribute the material, but you cannot profit from doing so.

NoDerivatives, CC-ND. You can copy, present and distribute the material only in its original form. You cannot adapt, build upon or remix the material.

These symbols can be found in various combinations on sites such as Flickr, YouTube, Wikipedia, Medium and Behance.

“I learned about Creative Commons thanks to CC0, a tool which enabled me to use photos and graphics without listing their authors. This was very useful back when I was at university, where I was responsible for promoting our student organization – I wanted to do it for free, but at the same time as professionally as possible. I want to support the Polish branch of CC, which, together with Centrum Cyfrowe Projekt: Polska, helps cultural institutions, teachers and others share and use open-access resources”, says Olga.

Icons: Creative Commons, CC BY 4.0

hospiCare

hospiCare is a mobile app project facilitating the work of those involved in caring for domestic children’s hospice patients.

“I did not know what domestic hospices were until I met Eliza and Paula – the creators of hospiCare. I wasn’t aware that a terminally ill child could stay at home at all times and still receive care from a hospice. Or that, in practice, it involves visits by a dozen doctors every day, hundreds of phone calls and messages, large amounts of medicines and scattered medical records which grow in size every day”, says Olga.

The hospiCare app can facilitate the work of medical teams and help carers in their everyday tasks. Its features will include online access for authorised users to the complete medical records of a given patient, medicine dosage reminders and tools making remote medical consultations easier. The app will be available for free to all children’s domestic hospices in Poland.

“I admire the project, and its creators even more. The girls draw on their own experiences looking after terminally ill family members, but are far from wallowing in suffering. They have concrete ideas on how to finance hospiCare. They want to involve other parents of ill children who cannot find work despite their education and skills”, Olga adds.

The hospiCare team needs more funds to develop and maintain the app. To support the project, you can donate to Fundacja Zostaw Swój Ślad via bank transfer with the title “hospiCare”.

Festival of mobile development in Łódź. Mobilization IX review

Last Saturday I attended a conference organized by our friends of JUG Łódź. In between supporting the organization of the event, I had a chance to watch the presentations covering the topics of MVVM and CI/CD in the domain of mobile app development. I would like to share my impressions and thoughts.

Mobilization IX 2019 conference opening
Conference opening (Image: Paweł Włodarski/Mobilization).

“Building a CI/CD pipeline for your mobile app”

As we use CI/CD processes at Sidnet I wanted to check how others approach this practice to make sure that we aren’t missing anything important.

Peter-John Welcome, a guest from Johannesburg, has showcased the whole process in a very clear manner and it was mostly consistent with my experience. The Continuous Integration and Continuous Deployment (/Delivery) practices are nothing more than the automation of manual processes that occur during the Software Developer’s daily work, and the improvement of its various aspects.

Peter-John Welcome on CI/CD in mobile app development during Mobilization IX 2019
Peter-John Welcome during his CI/CD lecture, covering the domain of mobile app development (Image: Paweł Włodarski/Mobilization).

The speaker recalled the fact that the processes in the IT domain do not necessarily follow strict rules. For example, Peter-John Welcome mentioned the topic of using code-verifying bots to check for coding standards or formatting. He said that if no heated discussions at the stage of Code Review emerged, the automatic check could be skipped.

The idea is harmless but, in my opinion, it is also far from optimal. Speaking from my experience I can say that standardization eliminates senseless disputes. It becomes quite clear for everyone involved in the project, as to what formatting shall be used. The bot’s task is simpler as well. It is to make sure whether the given code matches the defined standards. Automation of this step is a time-saver for the whole team, so I wouldn’t recommend getting rid of it from the processes.

“MVVM as good (anti)pattern in iOS”

The developer world has been recently buzzing with regards to the MVVM (Model-View-ViewModel) pattern. Is it a righteous step to utilize it in iOS apps? Mateusz Szklarek considers this to be an error. Szklarek bases his beliefs on experience. His conclusions come, for instance, from a project concerning a mobile app involving 250 thousand lines of source code.

Mateusz Szklarek on using MVVM pattern in mobile app development during Mobilization IX 2019
Mateusz Szklarek’s speech on MVVM (Image: Paweł Włodarski/Mobilization).

As noted by Szklarek, MVVM eliminates the Massive View Controllers file problem, quite frequently emerging when MVC (Model-View-Controller) pattern is employed. In case of MVVM another problem is quite prevalent – namely, the Massive View Models.

MVVM is far from perfect. However, no perfect solution exists, to be honest. Whether the given idea or tool would work depends very much on the way in which it is utilized by  devs themselves. Szklarek said that following the crowd and using the MVVM methodology the way everyone uses it, is not really a valid strategy.

Solution? Common-sense, as usual. Any patterns or tools are there for you – just make sure you are using them in a manner that is rational. The solutions should be tailored to a problem, not the other way round. I would like to emphasize the fact, as the speaker I am referring to did, how important programming principles are. Following them makes it possible to tailor the given pattern and thus, to overcome the issues emerging in each and every model.

Although I was not able to participate in all presentations, I am glad that I could help the organizer.

“Krzysztof, respect for being ready to work hand in hand during the conference. Thanks for your mobilization!”

Marek Defeciński
Mobilization Organiser

#SidnetDonations: Krzysiek for Vim and the Foundation for Polish Science

Halfway through October, Krzysztof Pisera is taking over the reins of our donation fund. Today he will choose the open-source and non-profit projects that we will be supporting this month. Tomorrow we will be celebrating the 10th anniversary of his first day at Sidnet, a career that he started as a very talented 21-year-old(!). As our lead developer, he has proven himself countless times to be excellent at organising the work of other team members as well as his own.

And if you happen to become nostalgic whenever someone mentions the early ‘90s, you will surely appreciate the fact that both of the projects chosen by Krzysiek began in 1991. What are these projects then?

Vim

Vim is a freely-available text and graphics editor, which is also referred to as a “programmer’s editor”. It supports hundreds of different programming languages and file formats.

According to Stack Overflow, it remains the fifth most popular development environment, even 28 years after its release. The community centred around Vim is engaged in a never-ending dispute (aka. editor war) with the users of another popular editor – Emacs. And inevitably, the Sidnet team includes supporters of both tools. However, Krzysiek avoids engaging in such conflicts as he considering them counterproductive. Nonetheless, he likes Vim so much that this will already be his fifth donation to the project as part of the Sidnet donation initiative.

“I tried Vim out years ago and I have been using it ever since due to its flexibility and the possibility of expanding its functionality, but above all, because of its efficiency. Vim is a model example of charityware. It is developed in a completely selfless manner and user donations are used to help children in Uganda”, Krzysztof said.

And as a side effect of the #SidnetDonations initiative, our company has been included in the Hall of Honour list available on the Vim website.

Foundation for Polish Science

The Foundation for Polish Science is the largest Polish NGO that supports scientists and research teams. It has been funding scholarships for young scientists since its establishment in 1991. Every year it provides scholarship holders with a total of PLN 3 million in donations. The foundation makes it possible for young, bright people under thirty to focus on their work, instead of worrying about money during the early years of their scientific career.

“Science is certainly an area that is close to my heart. Unfortunately, many outstanding scientists (and not only the youngest ones) often earn much less than the rest of our society. As a result, they have to choose between scientific work and more profitable endeavours. These people should be given an opportunity to focus their energy on what they truly excel at. Fortunately, the foundation also helps scientists commercialise their discoveries and inventions. We all benefit from that”, our lead developer said.

#SidnetDonations: Staszek for LibreOffice and the “Pomagam” Foundation

For Staszek, September is debut month. After all, it was in September of last year that he joined our team. And now, for the first time ever, Staszek is choosing the recipients of our monthly donations. At Sidnet, Michał Staszewski – aka “Staszek”, deals with sales. In a nutshell, he ensures that the customer understands the technical team and the technical team understand the customer.

See which open-source and charity projects will be receiving our financial support this month, as per Staszek’s request.

LibreOffice

LibreOffice is an open-source office program suite. It is used by tens of millions of people around the world, including government agencies in France, Italy and Taiwan. It is available in 110 different languages. The programme is being developed by The Document Foundation – a non-profit organisation which supports its operations thanks to volunteers. It is distributed under the Mozilla Public License.

“I started using LibreOffice at school when I needed a free alternative to Microsoft Office. Several years have passed since then and I still use it in my daily work. What is more, I also found myself in a team that deliberately gives up commercial software and aims to support open-source solutions such as LibreOffice,” Staszek explained.

So why does Staszek like LibreOffice?

  • Feature-richness. LibreOffice is the most comprehensive open-source office program suite available. It includes such tools as Writer (text editor), Calc (spreadsheet), Impress (presentation editor), Draw (graphics editor), Base (database editor) and Math (mathematical formula editor).
  • A plethora of supported formats. LibreOffice supports files with various extensions, including Microsoft Office formats (.docx, .xlsx and .pptx). In addition, LibreOffice’s native and open format, .odf (OpenDocument Format), is designed to guarantee free access to data, forever and regardless of the choices of commercial solution creators in the future.
  • Extensions. The functionality of LibreOffice can also be extended with additional functionalities, which is often an advantage of open-source software. There are a number of free plugins available on the Internet, including dictionaries, document templates and tools that improve the file export processes.

The “Pomagam” Foundation

The “Pomagam” Foundation from Łódź helps children suffering from diseases, as well as those in orphanages. Staszek knows this foundation “first-hand”.

“When I lived in Łódź, I met the president of the foundation – Ewa. Thanks to her enthusiasm, I became interested in helping others, especially ill children. I helped her in organising collections and transport,” Staszek said.

Since 2006, the “Pomagam” Foundation has donated over one million zlotys to people in need. The foundation provides financial aid to support the treatment and rehabilitation of ill children. In addition, it provides financial and educational support for children in orphanages while striving to introduce some positive experiences in their lives, for example, educational and integration trips, sports activities, workshops with psychologists and dog-assisted therapy.

“I am getting married next August. Instead of flowers, I would like the guests to bring school supplies for the foundation’s students. It will be just in time for the start of the new school year,” Staszek said, further encouraging us to help others in need.