It's the last day for these savings

Multi-language PHP: internationalisation for PHP developers

Learn how to easily adapt your PHP website or web application to offer multiple languages to its visitors

556 Students


All Levels


  • Overview
  • Curriculum
  • Discussion
  • Review
  • Instructor

What you will learn

  • Display your site's content in more than one language

  • Use gettext with PHP

  • Translate simple strings

  • Translate plurals, numbers and dates

  • Detect the visitor's preferred language

  • Translate content in databases

  • Use industry standards and best practices for localised content

  • Get support directly from the instructor

What are the requirements for taking your course

  • You must know PHP, including the basics of object-oriented code

  • You need to know the basics of using Composer to install packages

  • Ideally have a web server with PHP and Composer installed, but a brief overview of installing these will be covered

Who is this course for

  • PHP developers that want to make their site's content available in more than one language


If you are a PHP developer and you want to display your site in more than one language, then you need to learn how to internationalise your code. Offering your content in several languages will enable you to reach a larger audience.


Learn how to Internationalise your PHP code in this Comprehensive Course.

  • Learn how to get the language from the URL

  • Use international standards for identifying languages

  • Build reusable code for handling multi-language sites

  • Learn how to use the industry standard gettext

  • Translate dynamic content including plurals and dates

  • Translate content in databases

  • Create a user-friendly interface for visitors

The essential skills required if you want to develop a multi-language website or web application in PHP.

Not everyone understands the same language. To reach a larger audience with your content, you need to display your content in more than one language. gettext has been the industry standard for translating content for many years. In addition to learning how to use gettext with PHP, we'll learn how to offer the best experience for the international visitor.

Content and Overview

This course is designed for the PHP developer who currently has some content developed in one language. Learning the techniques on this course will enable you to internationalise your site, so you can display its content in multiple languages.

  • Suitable for all PHP developers, you'll start by learning the basics of internationalization (i18n) in PHP.

  • You'll learn best practices for getting the language code from the URL, and how to use it in your code.

  • Throughout the course, we'll build code that you can reuse in all your projects.

  • You'll learn how to use gettext, and also an alternative that overcomes its limitations.

  • In addition to simple strings, you'll learn how to translate plurals, numbers, dates and long strings of text.

  • You'll learn how to handle content in a database, along with how to handle images that contain text.

  • All the time we'll adhere to industry standards and best practices.

When you complete the course you'll be able to internationalise your PHP code, allowing you to display your content in more than one language.

Complete with all the code shown in the lectures, you'll be able to work alongside the instructor and will receive a verifiable certificate of completion upon finishing the course.

Also, at all times throughout the course you have access to the instructor in the Q&A section to ask for help with any topic related to the course.

Enrol now and add internationalization to your PHP skillset!

Introduction: software installation, configuration and setup

Introduction and welcome

Install a web server with PHP, a database server and phpMyAdmin

Optional: configure a virtual host with its own root folder and hostname

Install the Composer dependency manager

Enable the PHP internationalization extension

An introduction to translating content using PHP

Translate a page by copying the entire page and translating all the text in it

Translate a page by using conditional statements for every string

Store translated strings in an array with one array for each language

Display any character by encoding files using UTF-8

Getting the language from the URL

Language code standards and passing the language code in the URL

Get the language code from the query string

Get the language code from a subfolder or URL segment

Get the language code from a subdomain

Get the language code from the top-level domain

Locale identifiers and validating the language from the URL

Add an I18n class with a list of supported languages

Combine language codes and region codes to create locale identifiers


No Discussion Found


60 Reviews

Dave Hollingworth



This Course Includes

58 Lessons
3 Quizzes
0 Assignment
56 Downloadable Resources
Full Lifetime Access
Certificate of completion
Go To Class

Related Skills

More Courses From Jacob Collier