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.

All other Modules

Discuss all other Modules here.

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

Module Translation


Reply

3 Posts   786 Views

Avatar
bigsimon

11 July 2011 at 9:05pm Community Member, 2 Posts

HI,

I'm looking for a Tutorial "How to make a Module with different language".

I start using "abstract class ModelAdmin extends LeftAndMain {" but i didn't find anyway to translate, or to have this module for 2 language, i don't need to translate all the content but able to make content for both language.

Thank you

Avatar
Invader_Zim

11 July 2011 at 9:21pm (Last edited: 11 July 2011 9:22pm), Community Member, 141 Posts

Hi.

Not a tutorial, but a good read is here:
[url]http://doc.silverstripe.org/sapphire/en/topics/i18n[/url]
(especially the paragraphs about "Adapting modules for i18n" and the _t() function).

After that, you could download a module (e.g. Blog) and examine how translation was done there...

Hope that helps a bit.

Cheers
Christian

Avatar
swaiba

11 July 2011 at 10:12pm Forum Moderator, 1796 Posts

Also handy once using lang files...

http://www.leftandmain.com/silverstripe-modules/2011/05/13/langeditor/
http://www.leftandmain.com/silverstripe-screencasts/2011/05/13/langeditor-edit-language-files-in-the-cms/