Jump to:

5451 Posts in 1673 Topics by 1197 members

Customising the CMS

SilverStripe Forums » Customising the CMS » i18nTextCollector

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

Page: 1
Go to End
Author Topic: 1306 Views
  • lx
    Avatar
    Community Member
    81 Posts

    i18nTextCollector Link to this post

    Hi,

    for the first time i wanted to use the i18nTextCollector. But i have some problems with it.

    Rewriting Core Language Files
    http://localhost/testproject/dev/tasks/i18nTextCollectorTask/?module=mysite should collect every _t that is in my mysite-folder.

    But i get this error message:
    [Warning] fopen(/srv/www/htdocs/testprojekt/sapphire/lang/en_US.php): failed to open stream: Permission denied

    Why is it trying to write into this File? When i chmod it to 777 the process is running but the original file becomes much shorter. Most of the variables are lost.

    Template-Parsing?
    In my template-file \themes\testproject\templates\Includes\NewsPage.ss i am using the _t-Funktion:

    <% _t('News.WEITER','weiter',PR_MEDIUM, 'weiter-Button bei News mit internem Link') %>

    Is The TextCollector really runnig through templates? It did not generate a corresponding variable.

    Thanks
    lx

  • banal
    Avatar
    Community Member
    901 Posts

    Re: i18nTextCollector Link to this post

    Hi lx

    I once wrote a small PHP script that basically does the same... until I noticed that such a thing already exists
    Anyway, you could give it a try and look if it works better for you: http://bummzack.ch/langbuilder/

  • lx
    Avatar
    Community Member
    81 Posts

    Re: i18nTextCollector Link to this post

    Thanks banal,

    but i would like to use the silverstripe built-in functions.
    Probably i am using them not correctly.

  • Martijn
    Avatar
    Community Member
    271 Posts

    Re: i18nTextCollector Link to this post

    Have you tried to add a writable en_US.php file to your modules lang folder?

    This worked for me (2.3.2)...

    1306 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.