0
votes

I have hosted multiple-site on a single UMBRACO instance . each site with different layout / behavior but used the same Macros (which Ref.dll) , In which it have predefine Umbraco dictionary Item

Eg. Dictionary item with two lang i.e, English (United States) and French (Belgium)

  Name :- UmDic_SiteName

  Dictionary item value 
  English (United States) :- "Site One Name In English"
  French (Belgium)        :- "Site One Name In French"

As umbraco Dictionary Item Name is defined in dll(Macros) , So It can not be change

Now for each different site Dictionary item values need to be different let say for Eg ,Site : Two to would something like following

Name :- UmDic_SiteName

  Dictionary item value 
  English (United States) :- "Site Two Name In English"
  French (Belgium)        :- "Site Two Name In French"

So their any way we can configure it . can we do any customized in umbraco.?

2

2 Answers

1
votes

There is no real solution, though the workaround I have applied is to use different regional languages/locales for different sites that share the same language.

I am managing a system that has 40 sites on 1 instance, and the way it is done is to use 2 slightly different languages. We have several German, French and English sites that require slightly different values for the dictionary items to localize the content to the region/country.

Let's say you have 2 sites in Dutch, one for Belgium and one for the Netherlands. Then we use "Dutch, Dutch" for the Dutch site, and "Dutch, Belgium" for the other, which makes sense of course.

But we have applied the same to different French sites, where we assign one "French, French" and the other gets "French, Belgium", even though they are both "French, French".

The sites share the same dictionary items, but you can still customize the values.

0
votes

Finally I have download Umbraco Source code. "umbraco_a7dae59a1e55" And added Code to add custom Language in Umbraco.

In umbraco Source >> \umbraco\cms\businesslogic\language\Language.cs

have modify condition in following method.

 public static void MakeNew(string CultureCode)
 public static void MakeNew(string CultureCode)
 public static Language GetByCultureCode(String cultureCode)
 private void updateNames()

like

  if ((CultureCode.Contains(CustLangPrefix)) || (new CultureInfo(CultureCode) != null))

where CustLangPrefix is custom lang prefix.