Jump to:

17452 Posts in 4473 Topics by 1971 members


SilverStripe Forums » Archive » Multilingual content deletion

Our old forums are still available as a read-only archive.

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

Page: 1
Go to End
Author Topic: 1001 Views
  • hitautodestruct
    Community Member
    19 Posts

    Multilingual content deletion Link to this post

    I recently started experimenting with the i18n feature in silverstripe 2.2.
    My site has a need for managing and updating several different translations of the content.

    I can't seem to get the handle on how to remove a certain language from the selection menu once I have created a translated page.

    For example:
    Say I have created a new translation of my site in Afrikaans (for testing purposes).
    I now wish to completely remove the option to translate in that specific language, from the selection menu.
    How would I go about doing this?

    My workaround consists of just hiding all the pages in that lanuage i.e. "unpublishing" them.
    But I assume there is a more finite way of deleting a specific translation.


  • Ingo
    Forum Moderator
    801 Posts

    Re: Multilingual content deletion Link to this post

    currently there's no concept of adding/removing specific languages, its just a database query that finds out all languages used in the SiteTree database records. this behaviour might change in the future, as its not very straightforward for the user.

    for now, you can go through your database and look for the "Lang" database column in the "*_lang" and "*_lang_versions" table and delete the records you no longer need (e.g. in african language).

  • hitautodestruct
    Community Member
    19 Posts

    Re: Multilingual content deletion Link to this post

    Hey Ingo,
    Thanks for the reply. I was beginning to think there was no one on the other end

    I don't know if this is where to post but I have come across a very frustrating error and it is the only thing thats keeping me from implementing SilverStripe on the main site.

    My problem is this:
    All I want to do is get my custom fields translatable.
    When I set a field to be Translatable('fieldname') I get a crazy error which I don't want to post here.
    But I attached a text file so you can view the error in it's full glorry.
    Baiscally it points to:

    FATAL ERROR: Object::__call() Method 'markUnexpanded' not found in class 'HomePage'
    At line 190 in /web/dev.wiztekmedia.com/http/html/sapphire/core/Object.php

    This is the code for the page type (HomePage.php)


    class HomePage extends SiteTree {
       static $db = array(
          'Slogan' => 'Varchar'
    //This is the code I insert that causes all the problems
       static $extensions = array(
       static $defaults = array(

          function getCMSFields() {
             $fields = parent::getCMSFields();

             $fields->addFieldToTab('Root.Content.Main', new TextField('Slogan', 'The slogan text under the rummy royal logo:'), 'Content');
             $fields->removeFieldFromTab('Root.Content.Main', 'Content');
        return $fields;

    class HomePage_Controller extends ContentController {
       function init() {


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.