Localizing Strings used by the RadiantQ Gantt widget
All the strings used in the RadiantQ Gantt control are enabled for localization. We have localized gantt for several languages that are distributed as part of the install at this location:
.....Src\ResourceStrings
|
//To load the RadiantQ culture JS and date JS based on the specified cultureName RadiantQ.Culture.Load(cultureName); //Or you have to manually include the script files in head tag. <script src="Src/ResourceStrings/en-US.js"></script> <script src="Src/Scripts/Utils/globalization/en-US.js"></script>
|
|
In ASP.NET MVC |
|
@*scripts loads based on the page culture e*@ @*date js globalization file*@ <script src="~/Src/Scripts/Utils/globalization/@string.Format("{0}.js", System.Globalization.CultureInfo.CurrentCulture.ToString())"></script> @*JQuery UI for globalization file for datetime picker. *@ <script src="~/Scripts/jquery.ui.datepicker-@string.Format("{0}.js", System.Globalization.CultureInfo.CurrentCulture.TwoLetterISOLanguageName)"></script> @*RadiantQ globalization file *@ <script src="~/Src/ResourceStrings/@string.Format("{0}.js", System.Globalization.CultureInfo.CurrentCulture.ToString())"></script>
|
|
In ASP.NET |
|
@*scripts loads based on the page SelectedValue e*@ <script src="<%= Page.ResolveClientUrl("~/Src/Scripts/Utils/globalization/"+this.lang.SelectedValue +".js") %>" ></script> <script src="<%= Page.ResolveClientUrl("~/Src/ResourceStrings/"+this.lang.SelectedValue +".js") %>" ></script> <script src="<%= Page.ResolveClientUrl("../../Scripts/jquery.ui.datepicker-"+this.lang.SelectedValue.Split('-')[0] +".js") %>" ></script>
|
By default the Gantt widgets comes with localized string files for the fr ,de ,es ,ru, ja, nb, zh, us, no cultures.
Here is the resultant

This is illustrated in this samples:
In HTML : ..\Samples\LocalizedStrings.htm.
In ASP.NET MVC : ..\Views\Home\Common\LocalizedStrings.cshtml.
In ASP.NET : ..\Samples\Common\LocalizedStrings.aspx.
Localized Date strings in the Gantt
The date.js that the gantt uses is an open source library that supports 150+ cultures. To know more about this take a look at this.
The Localized Date strings in the Gantt widgets are based on the date js file included in the web page. By default all the samples reference the "Date.JS" file, this file is for "en-US" culture.
To support a different culture, include that culture's date js file in your page.
Static file inclusion.
|
<!-- Set the CultureInfo to fr-FR (French) --> <script src="Src/Scripts/Utils/globalization/fr-FR.js" type="text/javascript"></script> |
Note: Make sure the Date script is included before the Gantt widget is created.
© RadiantQ 2022. All Rights Reserved.