Chinese (People's Republic of China)  English  Français


Supinfo-Projects.com
Tous les projets des élèves ingénieurs de Supinfo



Projets
  Dernier Projet
  Les plus populaires
  Tous les Projets

212 Visiteurs
3168 Projets


My Supinfo-Projects

   Connectez-vous
   Créez un Compte


Synopsis

   11 Visites
   Note INTERNET : 20
    (2 Votants)
   1227 Commentaires

   Lire l'article

Evaluez cet article

20
18
16
14
12
10
8
6
4
2
0


Commentez cet article

Auteur :

Email :

Votre commentaire :



 
2005 - Pérennisation
Localisation width ASP.NET V2 -Whidbey
[20 mn de lecture - paru le 5/10/2005 12:26:14 PM - Public : Confirmé]

Auteur

degrem_mMichel DEGREMONT
Elève-Ingénieur Supinfo Paris
Promotion SUPINFO 2006

   Lui écrire
   Tous les projets de cet auteur
   Le mini-CV de cet auteur

2. More explanation

2.1. Possibilities offered by ASP.NET V2

With ASP.NET V2 the localization is simplified.

You have the choice between :

  • ResourceManager
  • Localisation Implicit
  • Localisation Explicit

2.2. To generate the files of Resource RESX

All the pages which you wish to locate, must have their own file of resource RESX.  These files of resource can contain controls of the page thus the properties and the values having the attribute of localization.

Whidbey enables you to create quickly the files of resource RESX.

- To create a new page Information.aspx

- To place several controls Web : Label, TextBox, Button, Image et un GridView

- Then in the bar of menu >> Tools >> Generate Local Resource

localisation asp.net V2 whidbey

To look in Solution Explorer.You must see a new File called LocalResources with inside the file of resource : Information.aspx.resx.

The files of resources are defined in the LocalResources. repertory by extension RESX.

A certain convention should be followed :

  • /folderRessource/page_name.extension.resx = for to default page, neutral page.
  • /folderRessource/page_name.extension.country[-area].resx = for many languages.

Exemple :

  • /LocalResources/Default1.aspx.resx
  • /LocalResources/Default1.aspx.fr.resx
  • /LocalResources/Default1.aspx.fr-car.resx
  • /LocalResources/MasterPage1.master.resx
  • /LocalResources/MasterPage1.master.fr.resx

or   --> /app_globalresources/Default1.aspx.resx width BETA 2
more information : http://msdn.microsoft.com/asp.net/beta2/beta2update.aspx

 

localisation asp.net V2 whidbey

Open Information.aspx.resx

You should see :

localisation asp.net V2 whidbey

With you to put the values which you wish. 

I let to you test.. 

If you turn over in the Information.aspx page You can note that your controls Web underwent modifications:

 

<asp:Label ID="Label1" Runat="server" Text="Label" meta:resourcekey="LabelResource1">asp:Label>
<asp:TextBox ID="TextBox1" Runat="server" meta:resourcekey="TextBoxResource1">asp:TextBox>
<asp:Button ID="Button1" Runat="server" Text="Button" meta:resourcekey="ButtonResource1" />
<asp:Image ID="Image1" Runat="server" meta:resourcekey="ImageResource1"/>
<asp:GridView ID="GridView1" Runat="server" meta:resourcekey="GridViewResource1" >asp:GridView>

localisation asp.net V2 whidbey

2.3. Localisation Implicit

The implicit localization must have its own files for each Web page of your Web application.  The disadvantage it is that you cannot re-use the file of resource of a page for other page of the application.

<asp:Label id=Label1 meta:resourcekey="resource-key-prefix" runat="server"></asp:Label>

2.4. Localisation Explicit

If you wish to do it you must use the Explicite localization.  Attention, the attribute of localization will be only more complex.

The only difference between the implicit localization and clarifies is that the explicit localization can have one or more files of resource, whereas the implicit localization asks for the creation of a file of resource for each page.<asp:Button id=Button1 Text=" <%$ Resources: ClassName, ResoureKey, Default value %> " Runat="server>

In the Page directive you must add the attributes : UICulture =auto et Culture =auto.



Articles de la même catégorie

 Pages : Top


11 Visites
0 Commentaires
Create a Mozilla Firefox extension
[25 mn de lecture - paru le 5/10/2005 12:08:41 PM - Public : Confirmé]

En savoir plus


25 Visites
0 Commentaires
Processus et Threads
[50 mn de lecture - paru le 5/10/2005 12:02:26 PM - Public : Débutant]

En savoir plus


14 Visites
0 Commentaires
Management of the memory in C
[20 mn de lecture - paru le 5/10/2005 12:00:31 PM - Public : Expert]

En savoir plus

   Tous les Articles


SUPINFO Training Center peut vous proposer une formation ...

   Devenez Ingénieur Système Microsoft en 35 jours avec SUPINFO Training Center
   Devenez Certifiés Cisco en 13 jours avec SUPINFO Training Center
   Devenez Administrateur Système Microsoft avec SUPINFO Training Center
   Devenez Développeur Microsoft .NET en 13 jours avec SUPINFO Training Center



Powered by Campus-Booster Technology
Conditions d'utilisation & Copyright | Respect de la vie privée
© Copyright 1965-2006 Supinfo Paris, Paris Academy of Computer Science
Supinfo, Ecole Supérieure d'Informatique et Paris Academy Of Computer Science are trade marks.
23, rue de Château LANDON - 75010 PARIS - Phone : +33 (0) 153359 700 Fax : +33 (0) 153359 701

Web site autided by :