PDA

View Full Version : Globalization error



jogave
Jul 21, 2016, 2:25 PM
Hi guys, I am trying to change mi aplication to spanish (Datepicker and alert etc) and set this
<globalization culture="es-ES" /> in the web.config
and

<body>
@(Html.X().ResourceManager().Locale("es"))

in the layout file but It this continues to show messages in English. Please any can help me?

Thanks.

web.config


<?xml version="1.0" encoding="utf-8"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=301880
-->
<configuration>
<configSections>
<section name="extnet" type="Ext.Net.GlobalConfig" requirePermission="false" />
</configSections>
<connectionStrings>
<add name="_XIRIUSConexion" connectionString="data source=172.28.1.10\SQLEXPRESS; initial catalog=Xirius_Dev; User Id=sa; Password=Xirius.2016;"/>
</connectionStrings>

<appSettings>
<add key="webpages:Version" value="3.0.0.0" />
<add key="webpages:Enabled" value="false" />
<add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
</appSettings>
<system.web>

<sessionState timeout="20000"></sessionState>


<compilation debug="true" targetFramework="4.6" />
<httpRuntime targetFramework="4.6" />

<globalization culture="es-ES" />
<!-- This httpHandlers config only required if using IIS6 (or lower) --><!--
<httpHandlers>
<add path="*/ext.axd" verb="*" type="Ext.Net.ResourceHandler" validate="false" />
</httpHandlers>
--><!-- This httpModules config only required if using IIS6 (or lower) --><!--
<httpModules>
<add name="DirectRequestModule" type="Ext.Net.DirectRequestModule, Ext.Net" />
</httpModules>
--><pages>
<controls>
<add assembly="Ext.Net" namespace="Ext.Net" tagPrefix="ext" />
</controls>
<namespaces>
<add namespace="Ext.Net" />
<add namespace="Ext.Net.MVC" />
</namespaces>
</pages></system.web>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform .CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform , Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701" />
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform .VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform , Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+" />
</compilers>
</system.codedom>
<extnet theme="Triton" licenseKey="** Ext.NET LICENSE KEY HERE **" initScriptMode="Linked" /><system.webServer>

<handlers>
<add name="DirectRequestHandler" verb="*" path="*/ext.axd" preCondition="integratedMode" type="Ext.Net.ResourceHandler" />
</handlers>
<modules>
<add name="DirectRequestModule" preCondition="managedHandler" type="Ext.Net.DirectRequestModule, Ext.Net" />
</modules>
</system.webServer></configuration>





_Layout.cshtml


@using Ext.Net;
@using Ext.Net.MVC;

<!DOCTYPE html>
<html >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>@ViewBag.Title - Xirius V.1.0</title>


<link href="~/Content/XIRIUS.css" rel="stylesheet" />
<script src="~/Scripts/XIRIUS.JS/Xirius.General.js"></script>
@RenderSection("headtag", required: false)



</head>
<body>
@(Html.X().ResourceManager().Locale("es"))

@RenderSection("cabecera", required: false)


<section class="container body-content">
@RenderBody()

</section>


@RenderSection("scripts", required: false)


<link href="~/Resource/Css/XiriusStyle.css" rel="stylesheet" />
</body>
</html>

fabricio.murta
Jul 22, 2016, 5:47 AM
Hello @jogave!

Have you tried adding locale="es" to your Web.config, in the extnet node?

To me it looks like you are not setting the locale on the main pages so the generated code is not considering spanish locale while building the code that loads the sections of your page!

Hope this helps!