Foros del Web » Programación para mayores de 30 ;) » .NET »

Poner el formato de fecha en un idioma en específico

Estas en el tema de Poner el formato de fecha en un idioma en específico en el foro de .NET en Foros del Web. El post #16 de los FAQ's: http://www.forosdelweb.com/showthrea...8&page=2&pp=15 Pero como yo hago para que la aplicación completa use el idioma "es-DO 0x1C0A Spanish - Dominican Republic"? ...
  #1 (permalink)  
Antiguo 14/08/2004, 07:14
Avatar de RsOfT  
Fecha de Ingreso: marzo-2002
Ubicación: InterNET
Mensajes: 1.121
Antigüedad: 22 años, 2 meses
Puntos: 7
Pregunta Poner el formato de fecha en un idioma en específico

El post #16 de los FAQ's:
http://www.forosdelweb.com/showthrea...8&page=2&pp=15

Pero como yo hago para que la aplicación completa use el idioma "es-DO 0x1C0A Spanish - Dominican Republic"?

Ademas, tendré que tener una variable tipo DateTime e igualar mis fechas a esa variable para que tome el formato de la cultura?
__________________
.::RsOfT::.
--El que se aferra a lo conocido, nunca conocerá lo desconocido--
--Es intentando lo imposible como se realiza lo posible--
--Es de pésimo gusto contentarse con algo mediocre cuando lo excelente está a nuestro alcance--
  #2 (permalink)  
Antiguo 14/08/2004, 09:25
 
Fecha de Ingreso: abril-2003
Mensajes: 606
Antigüedad: 21 años
Puntos: 2
Cambia esto en tu Web.Config

culture="en-US" uiCulture="de-DE"

Donde dice "en-Us" deberías poner los de tu país.

"es-XX"

Saludos
  #3 (permalink)  
Antiguo 17/08/2004, 06:43
Avatar de RsOfT  
Fecha de Ingreso: marzo-2002
Ubicación: InterNET
Mensajes: 1.121
Antigüedad: 22 años, 2 meses
Puntos: 7
mi Web.Config no tiene esa etiqueta, ahi te lo pego para que me indiques donde lo coloco.

Código:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
    
  <system.web>

    <!--  DYNAMIC DEBUG COMPILATION
          Set compilation debug="true" to insert debugging symbols (.pdb information)
          into the compiled page. Because this creates a larger file that executes
          more slowly, you should set this value to true only when debugging and to
          false at all other times. For more information, refer to the documentation about
          debugging ASP.NET files.
    -->
    <compilation defaultLanguage="vb" debug="true"><assemblies></assemblies></compilation>

    <!--  CUSTOM ERROR MESSAGES
          Set customErrors mode="On" or "RemoteOnly" to enable custom error messages, "Off" to disable. 
          Add <error> tags for each of the errors you want to handle.
    -->
    <customErrors mode="Off"/>

    <!--  AUTHENTICATION 
          This section sets the authentication policies of the application. Possible modes are "Windows", 
          "Forms", "Passport" and "None"
    -->
    <authentication mode="Windows"/> 


    <!--  AUTHORIZATION 
          This section sets the authorization policies of the application. You can allow or deny access
          to application resources by user or role. Wildcards: "*" mean everyone, "?" means anonymous 
          (unauthenticated) users.
    -->
    <authorization>
        <allow users="*"/> <!-- Allow all users -->

            <!--  <allow     users="[comma separated list of users]"
                             roles="[comma separated list of roles]"/>
                  <deny      users="[comma separated list of users]"
                             roles="[comma separated list of roles]"/>
            -->
    </authorization>

    <!--  APPLICATION-LEVEL TRACE LOGGING
          Application-level tracing enables trace log output for every page within an application. 
          Set trace enabled="true" to enable application trace logging.  If pageOutput="true", the
          trace information will be displayed at the bottom of each page.  Otherwise, you can view the 
          application trace log by browsing the "trace.axd" page from your web application
          root. 
    -->
    <trace enabled="false" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true"/>


    <!--  SESSION STATE SETTINGS
          By default ASP.NET uses cookies to identify which requests belong to a particular session. 
          If cookies are not available, a session can be tracked by adding a session identifier to the URL. 
          To disable cookies, set sessionState cookieless="true".
    -->
    <sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;user id=sa;password=" cookieless="false" timeout="20"/>

    <!--  GLOBALIZATION
          This section sets the globalization settings of the application. 
    -->
    <globalization requestEncoding="utf-8" responseEncoding="utf-8"/>

	<!-- Para llamarlo se utiliza: 
	System.Configuration.ConfigurationSettings.AppSettings("cnn")
	
	<appSetting>
		<add key="cnn" value="escribes tu connectionstriong"/>
	</appSetting>
	-->
  </system.web>
</configuration>
__________________
.::RsOfT::.
--El que se aferra a lo conocido, nunca conocerá lo desconocido--
--Es intentando lo imposible como se realiza lo posible--
--Es de pésimo gusto contentarse con algo mediocre cuando lo excelente está a nuestro alcance--
  #4 (permalink)  
Antiguo 17/08/2004, 08:59
Avatar de RootK
Moderador
 
Fecha de Ingreso: febrero-2002
Ubicación: México D.F
Mensajes: 8.004
Antigüedad: 22 años, 2 meses
Puntos: 50
Cita:
<system.web>
...
...
<globalization culture="en-US"
uiCulture="en-US"
/>
...
...
</system.web>
Salu2
__________________
Nadie roba nada ya que en la vida todo se paga . . .

Exentrit - Soluciones SharePoint & Net
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 01:58.