Change title display name of language when create language selecteors.

duy luu asked on June 7, 2018 12:32

Hi, I just started using Kentico and I have a situation when I add more culture in the website on CMS. A new language is displayed on the selector bar but I want to change the title of language in selector. Can anyone guide me? Thanks !! link image: https://ibb.co/h55Y2o

Image Text

Recent Answers


Peter Mogilnitski answered on June 7, 2018 13:18 (last edited on June 7, 2018 13:19)

Take a look at documentation.

P.S. I think you have an issue of resource string resolution. You have resource string "DancingGoat.vi-vn" which is resolved for English and Spanish but not for Vietnamese. Go Localization and try to find "DancingGoat.vi-vn" string and add translation Vietnamese.

0 votesVote for this answer Mark as a Correct answer

duy luu answered on June 7, 2018 16:52

I using the demo site "Dancing Goat" to add a new language in the site,I add more language by add the cultures in "Sites" module and I creating multiple language versions of pages. The title "dancingGoat.vi-vn" appears on selector bar for the visitors change language of page and I don't know change the "dancinggoat.vi-vn" to "Vietnamese". I tryed go to Localization but not found any data in Resource strings. What do I have to do now :(

0 votesVote for this answer Mark as a Correct answer

Peter Mogilnitski answered on June 7, 2018 23:48 (last edited on June 8, 2018 12:49)

Ok. I've done some digging. There is an issue is with the transformation. If you go to master page: there are 2 web parts language selector and language data source. Take a look at the transformation inside the language selector web part.

There is macro in transformation (and in the content before), that has the problem:

{%
  cultureLocalizedName = GetResourceString("dancinggoat." + CultureCode, (CultureCode == "es-es") ? "es-es" : "en-us");
  return
#%}

Not quite sure why they did this way. You can create resource string "dancinggoat.vi-vn" and put translation there if you want. Or you can change macro with something like this: {% GetResourceString("LanguageName")#%} and put resource string for LanguageName for all your cultures.

P.S. Th reason why you dont see resource string dancinggoat.en-us in localization because is Resource string priority.

0 votesVote for this answer Mark as a Correct answer

duy luu answered on June 11, 2018 05:32 (last edited on June 11, 2018 05:59)

Thanks for response, I try go to inside the language selector but not found the marco in trasformation code like this. I found the change display in language selector by add more item in file dancingGoat.resx in App_Data like (add more resource string): <data name="dancinggoat.vi-vn" xml:space="preserve"> Thanks

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.