Oct 28, 2013 ... Joomla! 2.5 provides native support for building multilingual web- site. In Joomla!
..... Most popular web server used for Joomla is Apache.
Build a Multilingual Website with Joomla! 2.5 A Step by Step Guide Suhreed Sarkar This book is for sale at http://leanpub.com/joomla-multilingual-website This version was published on 2013-10-28
This is a Leanpub book. Leanpub empowers authors and publishers with the Lean Publishing process. Lean Publishing is the act of publishing an in-progress ebook using lightweight tools and many iterations to get reader feedback, pivot until you have the right book and build traction once you do. ©2012 - 2013 Suhreed Sarkar
Tweet This Book! Please help Suhreed Sarkar by spreading the word about this book on Twitter! The suggested tweet for this book is: I just bought Build a Multilingual Website with Joomla! 2.5 The suggested hashtag for this book is #joomla-multilingual-website. Find out what other people are saying about the book by clicking on this link to search for this hashtag on Twitter: https://twitter.com/search?q=#joomla-multilingual-website
Also By Suhreed Sarkar ��������
Contents Preface . . . . . . . . . . . . . . . . . . . What this book covers . . . . . . . . . What you need for this book . . . . . . Who this book is for . . . . . . . . . . Conventions . . . . . . . . . . . . . . . Want to say something about the book? Found error? . . . . . . . . . . . . . . Pirates, ho? . . . . . . . . . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
1 1 3 3 3 5 5 5
Chapter 1. Getting Started with Joomla! 2.5 . . . What is Joomla? . . . . . . . . . . . . . . . . . . What are the main features of Joomla? . . . . . What can I do with Joomla? . . . . . . . . . . . How much it cost? . . . . . . . . . . . . . . . . What do I need to use Joomla!? . . . . . . . . . Setting a Development Environment . . . . . . Joomla! Installation - Step by Step . . . . . . . . Step 1. Getting Joomla! . . . . . . . . . . . Step 2: Setting Database . . . . . . . . . . Step 3. Uploading Installation Files . . . . . Step 4. Starting Joomla! Installation . . . . Install Step 1: Language . . . . . . . Install Step 2: Pre-installation check Install Step 3. License . . . . . . . . Install Step 4. Database Settings . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
6 6 8 9 14 15 16 17 17 18 19 20 20 21 22 22
CONTENTS
Install Step 5. FTP Configuration . Install Step 6. Main Configuration Install Step 7. Finish . . . . . . . . Summary . . . . . . . . . . . . . . . . . . . . Chapter 4. Managing Content Languages . Adding Content Language . . . . . . . . Editing a Content Language information Summary . . . . . . . . . . . . . . . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
24 25 26 31
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
32 32 36 37
Preface Joomla! is an award winning content management system, with lots of features. It is useful for almost all type of websites. It has an object-oriented, modular architecture with lots of extensibility features. You can build almost any kind of website using Joomla!. It has a strong security, authentication and authorization framework, content management framework, and template system. Joomla! 2.5 provides native support for building multilingual website. In Joomla! 1.5, you had to use third-party extensions like Joom!Fish to translate the site’s content. Multilingual content for the site was an extra feature with extensions. In Joomla! 2.5, multilingual content is native features, and you can assign language to every content items - category, article, module, menu and so on. However, configuring a web site for multilingual content still remains a challenge. Many developers face difficulties in configuring and running a multilingual website. This book aims to help those site owners and developers to run a multilingual web site without troubles.
What this book covers Chapter 1. Getting Started with Joomla!, begins with a discussion on why one should opt for using Joomla! and what are the benefits of doing this. Next, it shows how to install Joomla! 2.5 on a local computer. Chapter 2. Basic Configuration and Management, gives an overview of basic configuration and management tasks in Joomla!. If you are already experienced in Joomla!, you may skip this chapter.
Preface
2
Chapter 3. Managing Languages shows you how to manage languages for your Joomla! 2.5 site. First it shows, how to install a language pack for site’s front-end and backend user interface, and then set one as a default language. In Chapter 4. Managing Content Languages, we learn about adding content languages. Content languages are different from sit’s user interface languages and need to be added separately from Content tab in Language Manager. This chapter shows you how configure content languages for your site. Chapter 5. Managing Contents shows you how to configure Joomla! content categories and articles. To make the site multilingual, especially showing the contents in different languages, configuring categories and articles to be language sensitive is essential. Chapter 6. Managing Modules and Plugins shows how to configure some modules and plugins to enable multilingual feature of Joomla!. There are some modules and plugins that are specifically used for enabling multilingual features and you will learn to use them in this chapter. Chapter 7. Translating Site Language shows you how to translate site’s interface into your language. Although Joomla! translation teams translate Joomla!’s interface languages into popular languages of the world, you may not find your language there or you may make the translate as you want. In that case, you have to edit the language files. This chapter shows you how to do it manually and with the aid of an extension named Localise. Chapter 8. Translating Contents, deals with translating the site’s contents. When you write an article in Joomla!, you can specify its language. However, for each language you may need several versions in different languages. You can take help of Google Translate or other extensions to translate the contents. This chapter shows you some useful tools for translating contents.
Preface
3
What you need for this book First of all you will need Apache-MySQL-PHP environment to run Joomla!. We have used Joomla! 2.5.14. All descriptions and screenshots are based on this version. If you do not have access to any web hosting service, you still can use Joomla! and learn using your own computer. In that case, you need to setup development environment by installing WAMP on windows machine or MAMP on Mac OSX. More information on setting up development environment is provided in Chapter 1. To get the exact results, this book should be followed from the beginning to the end and perform the tasks as described. It is assumed that readers of this book have basic knowledge on Joomla!. Besides knowledge on Apache-MySQL-PHP environment and Joomla!, familiarity with HTML, CSS and PHP will be of added advantage.
Who this book is for If you are a Joomla!-based site owner or web developer and want to manage or develop a website that will use more than one languages, then this book is for you!
Conventions In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning. Code words in text are shown as follows: “As you can see, the tag can contain child elements.” A block of code is set as follows:
4
Preface
1 2 3 4 5 6 7 8
top left user1 ... right debug
New terms and important words are shown in italic. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: “ Once downloaded and installed, you will find the module in the Extensions >> Module Manager screen.” Warnings appear like this.
Errors appear like this.
Tips appear like this
Information appear like this
Questions appear like thus
5
Preface
Want to say something about the book? Feedback from the readers is always welcome. Let me know what you think about this book — what you liked or may have disliked. Reader feedback is important for me to develop titles that you really get the most out of me. Thanks to LeanPub you can comment directly on the book page http://leanpub.com/joomla-multilingualwebsite. The book may be considered as Living Document. Please feel free to let me know what topics you want to be covered in this book. With changes in Joomla! or other extensions used in this book this book will have updates or editions. Your feedback can shape the future editions.
Found error? Although I have taken every care to ensure the accuracy of the content, mistakes do happen. If you find a mistake in one of my books — maybe a mistake in the text or the code—we would be grateful if you would report this on book’s page. By doing so, you can save other readers from frustration, and help me to improve subsequent versions of this book.
Pirates, ho? Piracy of copyright material on the Internet is an ongoing problem across all media. As an independent author, I don’t have much power to restrict. If you see some sites providing illegal copies, please raise your voice. Many thanks for this. Happy reading!
Chapter 1. Getting Started with Joomla! 2.5 Joomla! Is an award winning content management system that helps developers build small to large sized websites and applications. It helps enterprises as well as individuals to maintain their web presence to blogging. In this chapter, you will know: • • • • • • •
What is Joomla!? What you can do with Joomla!? What are the main features of Joomla! Who is using Joomla!? What do you need to use Joomla? How do you get Joomla? How to install Joomla!?
On completion of this chapter, we will set our website using Joomla! 2.5, and throughout the book we will use that as an example site.
What is Joomla? If you have picked up this book, I guess, you already know what Joomla! is. If not, don’t worry; I’ll simply tell you what Joomla! is and how you can use it for your website development needs. to be clear, some of us may need to know what Joomla! is. Let’s see how Joomla! is defined on its website http://www.joomla.org : Joomla is one of the world’s most popular open source CMS (content management systems). With millions
Chapter 1. Getting Started with Joomla! 2.5
7
of websites running on Joomla, the software is used by individuals, small & medium-sized businesses, and large organizations worldwide to easily create & build a variety of websites & web-enabled applications. The definition above briefly describes what Joomla! is. However, it is still far from listing its power and features. Joomla! is one of the best open source content management systems, which can be used for almost any purpose. Its robust architecture and extensibility makes it popular among site builders, designers, and developers.
Joomla
Joomla! is a fork of Mambo, another PHP-MySQL based content management system. In August 2005, the OpenSourceMatters, Inc , a not for profit, formed under United States law, and exists to provide organizational, legal, and financial support for Joomla! open source project. The word Joomla originated from Swahili word jumla which means all together or as a whole. The name appropriately reflects the community spirit. Joomla! 1.0 was released at the end of the year 2005, with revamped Joomla! 1.5.x released in 2007. Joomla! 1.5 had many changes from its earlier codebase and application framework. However, there was a mechanism to run older extensions in legacy mode.
Chapter 1. Getting Started with Joomla! 2.5
8
In 2011, Joomla! 1.6 and 1.7 was released. These were short-life versions. In January 2012, Joomla! 2.5 was released which is a Long term support (LTS) version. To know more about Joomla!, please visit http:// www.joomla.org/about-joomla.html
What are the main features of Joomla? Joomla! is a very powerful CMS and probably the most popular CMS at present. Its popularity is due to powerful features which enables users to build and manage a rich website easily and rapidly. Following are some of the major features of Joomla!: • Easy installation and administration. Joomla! is easy to install and configure. It web based installer allows you to install Joomla! CMS through few steps . It has rich graphical user interface for configuring and administering the site. • Separation between front-end and back-end. Joomla! frontend and back-end are clearly separated and protected with security authentication. The websites user interface is presented as front-end, whereas all administrative and management tasks remain in the back-end. Some of the common management tasks, such as editing own articles, submitting articles, and so on, are also allowed from the front-end. • Access control. Joomla! needs authentication for management and administration tasks. There are different types of groups with different set of access rights. For example, members of Author group can access to certain content, submit their contents, and edit their own articles. Similarly members of Publishers group can edit, delete or publish articles submitted by authors. Access rights can also be set during creating content items, menu items and so on.
Chapter 1. Getting Started with Joomla! 2.5
9
• Easy templating system. Joomla! has an easy templating system which enables the designers and developers to develop and customize Joomla! templates using some basic knowledge of HTML, CSS and PHP. Joomla! templating system can apply separate templates for different sections of the site. • Easy extensibility through components, plug-ins and modules. One of the greatest features of Joomla! is its extensibility. Joomla! has a large number of components, plug-ins and modules by which users can add functionalities appropriate for them. Joomla!’s application framework allows developers to build applications which can run as Joomla! components. At present there are more than 9000 extensions available for Joomla!, and these can be downloaded from a single source http://extensions.joomla.org. • Search Engine Friendly URLs. Joomla! can generate search engine friendly URLs by by its core components. There are also some third party extensions for generating and managing SEF URLs in Joomla!.
There are many other features of Joomla!, and with every release the list of features is growing continuously. You can see the updated list of features for newer versions at http://www.joomla.org/corefeatures.html.
What can I do with Joomla? Joomla! is used for multipurpose websites starting from personal blogs to enterprise portals. It has almost every functionality needed for building a customized website that suits individual needs as well as enterprise’s needs. Although Joomla! can be used as a
Chapter 1. Getting Started with Joomla! 2.5
10
blog, WordPress or other popular blog engines are usually used for personal blogs or blog style websites. Here are some examples where Joomla! can be used and is most suitable for: • Corporate intranet, websites or portals: Joomla! has excellent content management functionalities which can enhance building corporate website or portals and help updating and managing site’s content. Joomla!’s WYSIWYG editing screen allows even non-technical persons to add, edit, update the web contents at anytime from anywhere just using a web browser.
PizzaHut France uses Joomla!
• Non-profit and organizational websites: Joomla! can be a great tool for non-profit organization’s website as it gives freedom to customize the CMS and build it as they need. As Joomla! is open source and free, it also helps the nonprofit organizations to minimize investment in building and maintaining websites.
Chapter 1. Getting Started with Joomla! 2.5
11
• Small business websites: Small businesses need a website to advertise their presence to their customers. However, usually they need to do so with a minimum investment in technology adoption. Free and Open Source Joomla! can help them jumpstart building their website without investing in highly priced commercial content management systems or developing their own CMS. • Government, school, college and charity websites: Joomla! can be best choice for government organizations, schools, colleges and charity organizations as it is open source and they have the freedom to adopt it to their context. It also saves money for buying a CMS.
Greece Ministry of Education using Joomla!
• Personal websites or family homepages: Besides company portals or online commerce, Joomla! can also be used as a simple personal blog or homepage. Its blogging functionality enables it to be one of the choice for blogging software. Similarly, you can use it as a common website for the whole family. • Community-based portals: Many community websites are built on Joomla!. Joomla! has some excellent components,
Chapter 1. Getting Started with Joomla! 2.5
12
such as Community Builder, for building and managing a community website. Users can register and express their views in a Joomla! community portal by blogging, posting to forums, exchanging personal messages, instant messaging, and even by building their own homepages. • Magazines and newspapers: Joomla! can be used for building websites for daily newspapers and magazines. There are some components, such as which helps Joomla! to turn into a newspaper or magazine site. Its design flexibility allows Joomla! to be used for such sites.
Barnes & Noble using Joomla! for its Nook Developer site
• Online commerce: Joomla! Can also be used as an online commerce site. There are many components which enable Joomla! to serve as an online shop and implement other ecommerce functionalities. • Multimedia Gallery: Joomla! can build stunning photo galleries, multimedia sharing and podcasting site. Several Joomla! components allow you to build a photo gallery, implement podcasting and make your site YouTube like video sharing site.
Chapter 1. Getting Started with Joomla! 2.5
13
MTV Greece uses Joomla!
In fact possibilities of using Joomla! has no limit. You can use it for almost any purpose with some design modification and programming some code. There are already a range of components available for extending Joomla!’s functionalities, which can be used to build: • • • • • • • •
Document management systems; Image and multimedia galleries; Business directories; E-commerce and shopping carts; Forums and chat software; Calendar and event management software; Banner advertising, data collection and reporting tools; and Personal blogging and newsletter system.
There are many other possibilities. Joomla! can also integrate some other open source applications to it and thus enhances its functionalities. For a list of examples of using Joomla!, please visit http://community.joomla.org/labels/joomlaportfolio.html.
Chapter 1. Getting Started with Joomla! 2.5
14
How much it cost? Joomla! is open source and FREE! Free as in ‘free beer’. You can download a copy of latest Joomla! release any time from anywhere in the world without cost. If you have internet connection, you simply go to Joomla site and download the latest release. On http: //www.joomla.org/download.html page, you will find the latest releases listed, as shown in the following screen shot.
Joomla! Download Page
You can download the package in .zip or other compressed format. For the first time installation, download the Full Package. If you are currently using another version of Joomla!, you may consider downloading Upgrade packages. If you want to run Joomla! on Microsoft’s platform, please visit http://www.microsoft.com/web/ joomla/.
Chapter 1. Getting Started with Joomla! 2.5
15
Joomla! on Microsoft Platform
Microsoft’s WebMatrix is also a Free tool for installing Joomla! and other web applications. If you are using Microsoft’s Platform (Windows+IIS+SQL Server), WebMatrix will help you a lot to install and configure whole environment for Joomla!.
What do I need to use Joomla!? Joomla! is based on PHP programming language. It uses database systems for storing contents. By default it uses MySQL. However, in recent versions of Joomla! you can use other RDBMS, such as Microsoft SQL Server and Oracle. For Joomla!, Apache is widely used. However, you can use Microsoft IIS for this too. In both cases, support for PHP must be there. In brief, you will need the following: • Web Server: A web server to run the site. The web server must support PHP. Most popular web server used for Joomla is Apache. You need Apache web server version 2 or above with PHP enabled as a module or cgi. Alternatively, you can use IIS on Microsoft Windows server.
Chapter 1. Getting Started with Joomla! 2.5
16
• PHP Support: The web server must support PHP. In most Linux based servers, PHP is configured with Apache. If you are using Windows Servers with IIS, please install PHP. For a good instruction of installing PHP in IIS, look at PHP on IIS. • Database System: All the contents of Joomla are stored in relational database systems. Popularly used database system for Joomla! is MySQL. You can run MySQL on almost all operating systems. However, recent versions of Joomla! also support Microsoft SQL Server and Oracle database server. If you want to use Joomla! with Microsoft SQL Server, please read this Blog Post.
For an updated list of ** Technical Requirements ** for different versions of Joomla!, please see http:// www.joomla.org/technical-requirements.html.
Setting a Development Environment Whenever you are developing some web application, it is better to first develop and test it in development environment. Once you are satisfied with the results of your configurations and customizations, then you can upload that to a production web server. For the exercise of this book, we are going to setup a development environment, and try our all codes and examples on this development environment. However, we will also learn how to do it on a live server. We already know that Joomla! runs on a web environment where Apache-MySQL-PHP needs to be present. We can get all these by installing each application separately or by installing one of the following packages:
Chapter 1. Getting Started with Joomla! 2.5
17
• WAMP : This package runs on Windows operating systems. It includes latest versions of Apache, MySQL and PHP. You can download WAMP server latest version and its documents from http://www.wampserver.com. • MAMP: Similar to WAMP, this package includes Apache, MySQL and PHP, but this runs on Apple MacOS computers. You can get MAMP and its documentation from http://www. mamp.info. • XAMPP: This package contains Apache, MySQL, PHP, Perl and more add-ons like PEAR, phpMyAdmin, and so on. XAMPP is available for multiple platforms including Linux, Windows and Mac OSX. You can download the appropriate version of XAMPP and its documentation from http://www. apachefriends.org/en/xampp.html. For the exercises in this book we are going to use WAMP. Setting up a development environment by installing WAMP server is discussed in Appendix A.
Joomla! Installation - Step by Step Let’s install Joomla! 2.5 for our example web site. We will use this installation of Joomla! For configuring as a multilingual website. The installation process is described below.
Step 1. Getting Joomla! Joomla! is available for download free of charge from its website http://www.joomla.org/download.html. You will see a to latest version of Joomla! listed in this screen.
Chapter 1. Getting Started with Joomla! 2.5
18
Joomla! Download Page
For this book, we are using Joomla! 2.5.8, as that is the latest version at time of writing this book. So, from the list of packages, click on one, for example ZIP beside 2.5.6 Full package. The file will be downloaded to your computer. Once downloaded, you can extract the file and see the folder for its contents. These files and folders need to be uploaded to your web server (local or remote).
Step 2: Setting Database We have learned that we need MySQL database server to install Joomla!. Before proceeding to actual installation of Joomla! we need to create a database for Joomla!. We can do it by using mysql command or through phpMyAdmin web interface. Let us create one database for ict4e site by using phpMyAdmin interface at localhost. For this, point your browser to http://localhost/phpmyadmin, and you will get the following screen:
Chapter 1. Getting Started with Joomla! 2.5
19
phpMyAdmin interface
In the Create new database field type the name of database, i.e. j25multilang, and select utf8_general_ci in Collation dropdown list. Then click on Create button. This will create a database named ict4e. However, there will be no tables yet. We don’t need to create tables now, these will be created during Joomla! installation. What we need to know now is the database name and username for that database. As we are using localhost, username will be root and password also root (on MAMP, for WAMP password is blank). However, for production environment you need to know the database username and password exactly what is used there.
Step 3. Uploading Installation Files Once you have downloaded the installation files and extracted those, you need to upload those to the web server before starting installation. If you are using a local web server for development, like us, copy the files to your web server’s webroot. I am using MAMP on Mac OSX and web root is /Applications/MAMP/htdocs. If you use WAMP on Windows computer it is more likely c:\wamp\www. Under this web root, we will create a folder joomla25multilang and copy Joomla! installation files to this folder. Files and folders in this directory will look like the following screen shot.
Chapter 1. Getting Started with Joomla! 2.5
20
Folders and Files for Joomla! Installation
If you are using a remote web server, you have to use some FTP client like FileZilla. Connect to the FTP server and upload the files to the appropriate directory.
Step 4. Starting Joomla! Installation Let us start installation of Joomla! now. We are going to install Joomla! on our development environment, i.e. localhost. We can start Joomla! installation simply typing a URL in the web browser. Before that make sure that you have started the local web server (MAMP or WAMP) and Apache-MySQL services are running. Open your web browser and type http://localhost/joomla25multilang in the address bar. This will take you to Joomla! Installation wizard.
Install Step 1: Language First screen in Joomla! installation wizard is Choose Language . You will be given options to choose a language for the installation steps.
Chapter 1. Getting Started with Joomla! 2.5
21
Choose Language screen
Select a language for installation steps, say English (United States) and click Next button.
Install Step 2: Pre-installation check Pre-installation check screen will be displayed.
Pre-installation check screen
This screen has two sections:
Chapter 1. Getting Started with Joomla! 2.5
22
The * First section shows you whether the system meets requirements for installing the Joomla! version you are installing. • Second section, shows the recommended settings and actual settings found on the server. Any deviation from the recommended settings will be shown in red. If there is any item red in the first section, you cannot install Joomla!. However, items with red color in the second section (Recommended Settings) will still allow you to install Joomla! successfully. You may change some PHP settings and recheck the settings by clicking on Check Again button. To proceed with installation, click Next button.
Install Step 3. License License screen will be displayed. This screen displays GNU General Public License. ! [GNU General Public License for Joomla!] (images/01/Joomla__Web_Installer_3.png) Read the license if you are not familiar with it. The license describes the terms of use of Joomla!. To proceed with installation, click Next button. Clicking Next means you have accepted the licensing terms.
Install Step 4. Database Settings Database Settings screen will be displayed. You have to provide database setting information on this page.
Chapter 1. Getting Started with Joomla! 2.5
23
Database Settings screen
In the Basic Settings section, you have to provide the following information: • Database Type: By default mysqli is selected. You can also use mysql. For our database, select mysqli. • Host Name: This is MySQL server’s host name. It is usually localhost. If you are using remote server, this name may be different and can be obtained from the hosting provider. • Username: This is username for connecting to database. The user should have permission to insert, update and delete records from the database. For our database, type root in this field. • Password: This is the password for the above username. For our default installation of WAMP server, root user’s password remains blank. So keep it blank in WAMP. If you have changed that password, type that password in this field. I am using MAMP, so I’ll type root here. • Database Name: Type the name of the database to be used for this Joomla! installation. We have created j25multilang database for this purpose, so type j25multilang in this field. • Table Prefix: Type the prefix you want for Joomla! tables. Prefix is useful when you are sharing same database for
Chapter 1. Getting Started with Joomla! 2.5
24
multiple applications. This prefix identifies Joomla! tables. You can type any prefix in this box except bak_ which is used for backed up tables in Joomla!. By default Joomla! 2.5 randomly generates a prefix for you and accepting that will be good choice in terms for security. Accept the default shown in this field. Once all these settings are configured, click on Next button to proceed with installation.
Install Step 5. FTP Configuration FTP Configuration screen will be shown. If you want to use FTP for uploading files to Joomla! website, you need to configure FTP settings in this screen.
FTP Configuration screen
By default this is disabled. To enable it, select Yes. Then type FTP User name, FTP Password for that user, and FTP Root Path. In the Advanced Settings section, you can type FTP Host and FTP Port. You can also configure whether FTP Password will be saved or not. For our site, keep the defaults (i.e. selected No) and click on Next button.
Chapter 1. Getting Started with Joomla! 2.5
25
Install Step 6. Main Configuration Main Configuration screen will be shown. There are mainly two sections: Site Name and Load Sample Data.
Main Configuration screen
In the Site Name box, type the name of your site. For example, Joomla! 2.5 | Mutilingual Site. In the next section, type administrator’s e-mail account in Your E-mail text field, then type password for the administrator account in the Admin Password text field. Then confirm it by retyping the password in Confirm Admin Password text field. By default, administrator username is admin. For security purpose, you may change to something else. In that case type your desired administrator account name in Admin Username field. Joomla! comes with some sample data. Installing these sample data helps you understand how Joomla! works. You will get some predefined categories, articles, menus and modules. The articles accompanied with Joomla! 2.5 will help you understand how to use it. Therefore, it is recommended that if you are new to Joomla!, you
Chapter 1. Getting Started with Joomla! 2.5
26
install default sample data. For installing default sample data, select one sample data set - Blog, Brochure or Default in Sample Data Set radio list and click Install Sample Data button. Within a few seconds Sample data installed successfully message will be displayed in place of Install Sample Data button. When installed sample data, click Next button.
Install Step 7. Finish Finish screen will be displayed. Here you will see some warning (in red color) about removing installation directory.
Finish screen
We will see a warning message. It advises us to remove the Joomla! installation directory named installation, and located under Joomla! installation root. Keeping this directory has a security risk, because anyone can point to this directory from his or her browser and start Joomla! installation again. Let us delete the whole directory by clicking Remove installation directory button. When done deleting, Instllation folder successfully removed message will be displayed.
Chapter 1. Getting Started with Joomla! 2.5
27
Installation Folder Deleted Successfully
On the top of the screen, we will also see two buttons – Site and Administration. By clicking on these we can go to website’s front-end or administration area. Also notice that administrative username is admin, and you need it to login to the administration panel. Let us click on Site button now. Then we see the default installation of Joomla! 2.5.10. As we have installed the sample data, the frontend of the site looks like below:
Chapter 1. Getting Started with Joomla! 2.5
28
Front-end of the Site with Default data
You can now look into the administrative panel, too. Let us type http://localhost/hrs/administrator/ in our browser’s location bar. It will take us to administration section login screen:
Chapter 1. Getting Started with Joomla! 2.5
29
Administration Panel Login Screen
Now type administrative username admin and password that you have assigned during installation. You may select language, too. Then click Login button. On successful login, you will see Joomla! Administration Panel.
Joomla! administration panel
The Joomla! administration panel is the place from where we will configure our Joomla! site and manage its contents. At the bottom of the screen you will see the version number of the installed Joomla!. If you have installed a version different from the most recent version
Chapter 1. Getting Started with Joomla! 2.5
30
you will see an icon in control panel stating availability of recent version. To remain with the security bindings, you should update to the most recent version of Joomla!. Click on Joomla! 2.5.4 Update Now icon. That takes you to Joomla Update screen.
Joomla Update screen
From Joomla! Update screen you can update your Joomla! installation to most recent version. This screen shows you installed Joomla version and latest Joomla! version. Click Install the update button to get updated. That downloads and installs the update. Depending on the speed of your internet connection, this may take some time. When done updating, you will see a message indicating that.
Joomla Update Completion screen
Now you have the most recent version of Joomla! 2.5 and you can proceed with further building the site.
Chapter 1. Getting Started with Joomla! 2.5
31
Summary In this chapter we have learned what Joomla! is, why we use Joomla!, what can be done with Joomla!, from where we can get a copy of Joomla!, and how we can setup Joomla!. For our example website, we have setup Joomla! and seen its front-end and backend. In the next chapter, we will learn how we can configure the site for our purpose. After knowing the basic configuration and management of Joomla! 2.5 we will move to configuring it as a multilingual site.
Chapter 4. Managing Content Languages In Joomla! there are two kinds of languages: translations for Joomla! User Interface elements, and language for contents. When you install a language pack for Joomla!, as done in Chapter 3, Joomla!’s front-end and backend user interface is displayed in that language. But to be truly multilingual website, you need to make your site’s contents (articles, blog postings, etc.) in different languages. In this chapter, you will know: • How to add language for Joomla! contents • How to make a language default for contents On completing this chapter, you will be able to add content languages for Joomla!, and make necessary changes to the configured content languages. In Joomla! 1.5, building multilingual site was a bit difficult. There was interface translations, but for using multilingual content, you need to use thirdparty extensions like Joom!Fish. But in Joomla! 2.5, multi-language for contents are available by default.
Adding Content Language After installing site language, you can add Content Language for that site. For content language, you don’t need to download anything. For adding a content language, follow the steps below:
Chapter 4. Managing Content Languages
33
Step 1. Go to Extensions > Language Manager, and click on Content tab. That shows the available content languages for that site.
Available Content Languages
Step 2. For creating a new content language, click on New icon in the toolbar. That shows Language Manager New Content Language screen.
Language Manager: New Content Language screen
You have to fill this form properly to create a new content language.
Chapter 4. Managing Content Languages
34
For example, we have installed language pack for Italian language and want to show our contents in Italian language. So we can fill this form as following screenshot:
Language Manager: New Content Language form filled for Italian language
You have to provide the following information: • Title: This is the title of the language. You will see this title in lists of languages. • Title Native: This is the language’s title in that Language. For French language, this will be Italiano. If you are adding Japanese language, value in this field will be in Japanese. • URL Language code: This is the brief name of the language that will be part of URL. For example, en for English, jp for Japanese, it for Italian, and so on. • Image Prefix: Just add the language prefix - such as en, ja, it, so that image for that language is shown. In Joomla! there are language flags, you can view the flag names and add appropriate image prefix here. For Italian, adding it respectively will be fine.
Chapter 4. Managing Content Languages
35
• Language tag: This is the language tag as per ISO. For English UK it is en-GB, for Japanese it is ja-JP and for Italian it is it-IT. • Description: In this field, you can add a brief description of the language. On the right side, you can add meta description for that language. One important setting is the Site Name. If you want to show the site name in that language - on the right click on Site Name and type site name in that language.
Site Name in native language
Step 3. When filled in all fields, just click Save & Close icon in the toolbar. Then you can see the language name in the list on Language Manager: Content Languages screen.
Chapter 4. Managing Content Languages
36
List of all content languages
You can enable or disable any content language from this screen, and can also rearrange the order of appearance of the languages in the language list in Language switcher module (we will be discussing this module later).
Editing a Content Language information You can change configuration information for a content language anytime. After adding the content language, if you find that something is misconfigured, you need to edit that information. For editing a content language information, click Extensions > Language Manager. That shows Language Manager screen. Click Content tab on this screen. Then click on the checkbox on the left side of the language name, and click Edit icon in the toolbar. That shows Language Manager: Content Language Edit screen.
Chapter 4. Managing Content Languages
37
Language Manager: Content Language Edit
If you need to change any field, change the value of that field and click Save & Close icon in the toolbar. That saves your change and brings you back to Language Manager screen.
Summary After installing site’s language pack, you need to add content language for the site. You can add content language from Content tab of Language Manager screen. We don’t need to download anything for this, but need to configure the language with name, ISO code, language code, and so on. We have seen how we can add such a language. Once we setup Content languages we need to work with content categories. In the next chapter, you will know how to create content categories and manage articles for a multilingual site.