When you are working with multiple site, and say text, did you mean e.g labels or so. If then you should take a look at the dictionary items function. With this you can add a key, and then translate the labels globally,
For instance you have a back to list link where you would like the translate the anchor text in to the different languages that you have set up on your Umbraco installation. The solution here would be create a dictionary item. The dictionary item key is unique, and the key is the name of the dictionary item
Suppose after adding all the sites. Now i want to change the content(which will be same) for that label for all those sites. site 1,site 2, site 3,site 4,site 5.
All the places where you need to add langauge specific text. you need to add dictionary items. So you need to go though your templates, Razor files, or XSLT files if you have some of them, and add the dictionary functionality, after that you need to create the dictionary items, in the settings section in the dictionary items folder.
If you have content which is common to all of your sites maybe it would make sense to store this in one place and use this content then on each of your sites.
So you have maybe a structure like:
root +site1 +site2 +site3 +common-content
If you're using XSLT then you could get to this a number of ways. One approach might be as follows.
So if your common content had text properties called "someHeading" or "someOtherText" you might display it like this:
How can we change the text globally for multiple site with single instance.
I have 5 sites in a single database of umbraco.
Like
site1
site2
site 3 all are in umbraco database.
Now i want to change text globally. Instead of adding the same text for each site1, then site2 etc.,
how can i do this.
please help.
Thanks,
deepika.
Hi deepika and welcome to our,
When you are working with multiple site, and say text, did you mean e.g labels or so. If then you should take a look at the dictionary items function. With this you can add a key, and then translate the labels globally,
For instance you have a back to list link where you would like the translate the anchor text in to the different languages that you have set up on your Umbraco installation. The solution here would be create a dictionary item. The dictionary item key is unique, and the key is the name of the dictionary item
http://24days.in/umbraco/2013/the-dictionary-secrets/
If you have access to Umbraco TV, you can see some videos how to create dictionary items and using dictionary items.
http://umbraco.tv/videos/implementor/multi-lingual/creating-a-multi-lingual-site/creating-dictionary-items/
http://umbraco.tv/videos/implementor/multi-lingual/creating-a-multi-lingual-site/using-dictionary-items/
If you are using razor, and an older Umbraco version here is how to access the dictionary items in Razor http://our.umbraco.org/documentation/reference/templating/macros/razor/using-dictionary-items
If you are using Umbraco 7 you need to access the doctionary items this way.
http://our.umbraco.org/documentation/reference/Querying/UmbracoHelper/#GetDictionaryValue%28stringkey%29
If you want to use dictionary in XSLT http://our.umbraco.org/documentation/Reference/Api/UmbracoLibrary/#GetDictionaryItem%28SystemString%29
Or if you want to use dictionary items directly into the templates, and you are using webforms you can use this.
If you are using MVC, instead of Webforms, you can use this:
I know this is a lot of information, but I hope this helps and if you have any further questions to this don't hesitate to ask again.
/Dennis
Thanks for your reply.
Yes i mean the label here.
Suppose after adding all the sites. Now i want to change the content(which will be same) for that label for all those sites. site 1,site 2, site 3,site 4,site 5.
How can I change it at once?
So i don't have to do it 5 times for each site.
Hi deepika.
All the places where you need to add langauge specific text. you need to add dictionary items. So you need to go though your templates, Razor files, or XSLT files if you have some of them, and add the dictionary functionality, after that you need to create the dictionary items, in the settings section in the dictionary items folder.
See Jans artcile here: http://24days.in/umbraco/2013/the-dictionary-secrets/
So there will be some work to create and place the code in templates and scripting files, either it's XSLT files or Razor files.
Hope this helps, or if I have misunderstood your question if so could you please try to explain it more detailed.
/Dennis
Hi,
Here on my requirement the sites are not related to langauge specific text. It is not a multi lingual sites
It will be just a normal text content which will be common for all site.
Some labels are common and some will be for a specific site.
If you have content which is common to all of your sites maybe it would make sense to store this in one place and use this content then on each of your sites.
So you have maybe a structure like:
root
+site1
+site2
+site3
+common-content
If you're using XSLT then you could get to this a number of ways. One approach might be as follows.
So if your common content had text properties called "someHeading" or "someOtherText" you might display it like this:
So here I am assigning the common content node to the variable
is working on a reply...