HowTo

... handle translations

 

Step 1: Website languages

Just in case you don't have setup other languages on your website, you have to create them in the root of your page tree. If you have already configured other languages, you can jump to step 4.

Step 2: configure the language in the template setup

Different languages work through an additional parameter in the URL, for example "L". Now if there is no L-parameter, you have your default language. This is an example of how the typoscript could look like:

 

# Localization:
config {
	linkVars = L
}
[globalVar = GP:L=1]
config {
	#The uid relates to the website language record we just defined
	sys_language_uid = 1
	# the typo3 language definition
	language = de
	# the php locale
	locale_all = german
	# the charset
	metaCharset = iso-8859-1
}
[globalVar = GP:L=2]
config {
	sys_language_uid = 2
	language = us
}
[global]
config.sys_language_mode = content_fallback

Step 3: Page translation

To create new translations, you have to enable the "Localization view" in the List view.

Now choose your calendar view page in the page-tree and create a new record: "Alternative Page Language". Repeat this step until you have one record for each language available. Notice, that you also have to create a record for the default language.

Go to the frontend and test the translation, by adding "L= 1" (or similar, according to your language definition) to your URL. Than try the other language. You should see, that the page title changes, according to your defined language.

Step 4: Record translation - backend

Switch to the list view and choose the sysfolder / page containing the cal records

Now you should see the additional option to localize. Select a flag to start the translation process for this record. Repeat this until all languages got their translation record.

Now you should see the additional option to localize the cal records. Go ahead and choose a flag.

Change the values accordingly to your needs, save the record and you are done :)

Repeat this for every record you want to be translated.

NOTE: just change text fields! There is no need to change a relation between another record and point it to a localized version. This will all be handled internally!

 

Step 5: Record translation - frontend

To also use the localization feature in the frontend, you have to add the "Translation options" to the allowed views for EACH (the translated ones too) cal-plugin instance.

You also have to enable the user/group: rights.create.translation.user / ~group =

Same for edit: rights.edit.translation.user / ~group =

 

And you should have a look at the language menu: view.translation.languageMenu

translation {
	# @description	Create links to the different available languages. Insert them in ascending order of the language uid
	languageMenu {
		1 = IMAGE
		1 {
			file = media/flags/flag_de.gif
			offset = 2,2
		}
		2 = IMAGE
		2 {
			file = media/flags/flag_uk.gif
			offset = 2,2
		}
	}
}
make sure the flags are correct ;)
If everything is done the right way, you should see this option when creating / editing an event:

The markers for the languageMenu are:

###CURRENT_TRANSLATION###

###TRANSLATION_OPTIONS###