Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Translating a contact form

Go to End

2 Posts   959 Views


Community Member, 101 Posts

15 October 2009 at 8:17am


im really enjoying working with translating in SS.
i have a site with four languages and i have two types of custome form (1) member registartion form (2) contact form.
how can i be able to translate the form fields into my four languages.

here is a part of my form code which i need translated

	 new TextField ('Name', 'Name *'),
	 new TextField('Vorname','Vorname *'),
	 new TextareaField('Adresse','Adresse *'),
	 new TextField('PLZ','PLZ'),
	 new TextField('Ort','Ort *'),
	 new EmailField('Email','E-mail *'),



Forum Moderator, 5521 Posts

15 October 2009 at 1:21pm

You should use the _t() function to define the strings to replace -

_t('A.ENTITY','String that is used in A and B');

Then run the TextCollector to generate the lang files, This will generate a en_US.php file in your mysite/lang folder which you can copy / paste for other languages -