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   830 Views

Avatar
bigsimon

Community Member, 2 Posts

11 July 2011 at 9:05pm

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

Community Member, 141 Posts

11 July 2011 at 9:21pm

Edited: 11/07/2011 9:22pm

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

Forum Moderator, 1808 Posts

11 July 2011 at 10:12pm

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/