This is my first blog and I am also learning Typo3.
I would like to explain how to add Internationalization support in Typo3.
The basic steps involve:
- Add Language extension and Create page
- Add some Typo3 script to integrate it
- Add language Flags in Front-end
Step1.1: Add Language & create pages
Select the list module and choose “new typo3 Dev site”. Details view (right side block) will show all entity belongs to the website.
Click “new” button on the top left show in the image.
Select web languages from the list.
Fill the information in following field.
b. ISO Code
c. Select flag Icon
Now we can add menu languages.
Step1.2 Creating Alternate language pages
Select the page that you want to add alternate page language. In Top right you fill find the dropdown. Select the language option. Dropdown will appear with list of languages that you created.
You can create the alternat language pages.
Step 2 : Typo Script:
config.sys_language_uid = 0
config.language = en
[globalVar = GP:L = 1]
config.sys_language_uid = 1
config.language = fr
Place this typoscript in Template.
To view the pages in the browser.
L flag will switch the languages.
Eg: http://–localhost-/index.php?id=23 will show normal English content.
Eg: http://–localhost-/index.php?id=23&L=1 will show the content in Russian
Step 3: Add Language Flags in Front end
Download sr_language_menu and static_info_tables extension from typo3 repository (http://typo3.org/extensions/repository/ ) and install them via extension manager.
Create a sample pages and add sr_language_menu plugin to that page. Remember the id of that plugin.
Plugin will display the list of language available to the website.
See the below script:
lib.lang = RECORDS
lib.lang.source = 9
Means we have to assign to content globally to the template, because script will read this content from the table (tt_content) in the database. Now assign the record into marker will show the language flag.
lang < lib.lang.source [/source]
Hope you liked my first blog. Please let me know your comments.