DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

EXT: sv_translate

Author:Kasper Skårhøj
Created:2002-11-01T00:32:00
Changed:2008-03-03T14:44:48
Author:Daniel Wegener
Email:avithan@googlemail.com
Info 3:
Info 4:

EXT: sv_translate

Extension Key: sv_translate

Copyright 2000-2008, Daniel Wegener, <avithan@googlemail.com>

This document is published under the Open Content License

available from http://www.opencontent.org/opl.shtml

The content of this document is related to TYPO3

- a GNU/GPL CMS/Framework available from www.typo3.com

Table of Contents

EXT: sv_translate 1

Introduction 1

What does it do? 1

Screenshots 1

Users manual 1

FAQ 1

Adminstration 1

Default Language 2

The translate-service programmer's manual 2

Known problems 2

To-Do list 2

Changelog 2

Introduction

What does it do?

This extension is the base for automated (provisorily) translations of content. Therefore it introduces a new service-type: translate, which can (in further extensions) add different (web-)services for autotranslation of your content.

This extension does not translate anything! If you want to use automated translation, you got to look for an (or more?) extensions which implement the translation service for the languages you need. Try to search for “ translate ” in the extension repository.

Screenshots

There is nothing visible – just imagine you click on “Create a copy for translation (Spanish)” and instantly get a rough, but maybe still usable translation for your content-element. Sounds Spanish? Eeeh... :)

Users manual

Just install the extension, there is not much to configure.

There is a new feature that enables this service to select its best combination of its subservices. That means, that if there are no direct translations from one language to another, this services checks if there is a way around (first translating to some other language and from there to the targetlanguage).

FAQ

Q: Why is my content not translated to language *xy* ? There is still just the notification [Translate to xy] !?! A: This extension does not translate anything. It is just an system-extension which enables other extensions to provide (web-)service-bindings to translationtools. Try to search for extensions which do bind a real translationservice (searchword “translate” in the extension repository).

Adminstration

This extension also overrides the default translation-message “[Translate to xy]” by adding a default service which handles translations where there is no specialised service available for. You can override it or add it for other languages by overwriting/extending the locallang.xml.

Default Language

One big problem for the extension is to guess, in which language the defaultLanguage (i.e. untranslated) --version of an content-element is written. Currently it uses the interface-language of the backend-user. But this can be overwritten by adding an Page- TSConfig value:

TCEMAIN.defaultLanguageCode

Property

TCEMAIN.defaultLanguageCode

Data type

string

Description

Overrides the be-defaultLanguageCode for this page (and all subpages). Used for Multiple-Branch localisation.

Default

[unset]

((generated))
Example
TCEMAIN.defaultLanguageCode = dk

The translate-service programmer's manual

A more detailed documentation will coming soon...

There is already a good manual about implementing services. It can be found here:

http://typo3.org/documentation/document-library/core- documentation/doc_core_services/0.2.0/view/

For implementing a new translation-service, use the EXT:sv_translate/sv/class.tx_svtranslate_svbase.php as superclass and implement the method process, where the parameter $content is an simple array with fieldnames as keys and content (text, html) as values. After the process-function has been called the translated content should reside in the $out variable.

The registred subtypes for an extension are comma-separated iso-2-code language pairs in the format “from|to”.So if you want to register your service as translater from english to frensh and englisch to german, your subtypes would be “en|fr,en|de”.

To get some example code, you can look into the extension “translate_google”.

Known problems

- Use this section for important warnings about bugs, problems or performance issues. This is where you should explain shortcomings of the extension, so people are properly warned. Be honest.

- Target group: Mostly Developers

To-Do list

Handling ISO3 locale-codes (like de_DE-1996).

Changelog

03-03-08 Daniel Wegener < avithan@googlemail.com >

* Added support for automated translations over more than one language. Did some code cleanup and naming changes.

13-02-08 Daniel Wegener < avithan@googlemail.com >

* Initial release

img-1 EXT: sv_translate - 2