# What makes websitestrings load to a website?

**URL:** <https://forum.litium.com/t/what-makes-websitestrings-load-to-a-website/97>\
**Category:** Questions\
**Created:** [May 30, 2018, 1:46pm UTC](https://forum.litium.com/t/what-makes-websitestrings-load-to-a-website/97 "2018-05-30T13:46:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![stefan.gross](https://avatars.discourse-cdn.com/v4/letter/s/7ea924/32.png) [@stefan.gross](https://forum.litium.com/u/stefan.gross)\
**Post date:** [May 30, 2018, 1:46pm UTC](https://forum.litium.com/t/what-makes-websitestrings-load-to-a-website/97/1 "2018-05-30T13:46:02Z")

</div>

What is it that makes websitestring(Text) that has a heritance of WebSiteStringDefinition to appear for a website in backoffice? We are using the accelerator and we have 7 websites configured, it works for 6 of them, but on the 7th i get no website strings. Yes i could export XML from one of the other site and import it but i would like to solve this with code.

Litium version: 5.6.2

---

<div class="post-metadata">

**Author:** ![marten](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/marten/32/11_2.png) [@marten](https://forum.litium.com/u/marten)\
**Post date:** [May 31, 2018, 6:25am UTC](https://forum.litium.com/t/what-makes-websitestrings-load-to-a-website/97/2 "2018-05-31T06:25:36Z")

</div>

Your websitestring class need to inherit from `WebSiteStringDefinition` and then you override the method `IEnumerable<WebSite> Setup()` and make it return all websites you want your strings created on.

So if you want your strings on every site your `Setup()`method should look like this to return all sites:

```auto
protected override IEnumerable<WebSite> Setup()
{
   return ModuleCMS.Instance.WebSites;
}
```

---

<div class="post-metadata">

**Author:** ![stefan.gross](https://avatars.discourse-cdn.com/v4/letter/s/7ea924/32.png) [@stefan.gross](https://forum.litium.com/u/stefan.gross)\
**Post date:** [May 31, 2018, 6:38am UTC](https://forum.litium.com/t/what-makes-websitestrings-load-to-a-website/97/3 "2018-05-31T06:38:51Z")

</div>

```
public class CustomWebsiteStrings : WebSiteStringDefinition
{
    [Translation("Return shipping", "en-gb")]
    [Translation("Returfrakt", "sv-se")]
    public virtual string ReturnShipping { get; set; }

    protected override IEnumerable<WebSite> Setup()
    {
        return ModuleCMS.Instance.WebSites;
    }
}

```

This is how my class looks like. And now if I create a new website that website doesnt get this text property. I’ve also tried rebuilding searchindex and restarting the IIS.

---

<div class="post-metadata">

**Author:** ![marten](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/marten/32/11_2.png) [@marten](https://forum.litium.com/u/marten)\
**Post date:** [May 31, 2018, 7:07am UTC](https://forum.litium.com/t/what-makes-websitestrings-load-to-a-website/97/4 "2018-05-31T07:07:09Z")

</div>

Ok, try removing the flag in the database that this file is already executed to make it run again:

`DELETE FROM Common.Setting WHERE [Key] LIKE '%CustomWebsiteStrings%`

After that restart the application.

Edit: noted that you are using version 5 so change `Common.Setting` to `dbo.Foundation_Settings` [as this was changed in version 6](https://forum.litium.com/t/updating-a-pagetype-from-definition/27/2).
