free hit counter
November, 2010 - Pietro Brambati Blog - Site Home - MSDN Blogs

Pietro Brambati Blog

Developer's stories

November, 2010

  • Pietro Brambati Blog

    Visita a Bari @ DotNetSide

    • 0 Comments

    Il prossimo 3 Dicembre sarò a Bari presso l’hotel Best Western Hotel HR, SS 96 km 119,300, Bari - Modugno 70123, dove si terrà un evento con laboratorio organizzato dalla community DotNetSide in collaborazione con Microsoft Italia

    Agenda Evento

    L’evento inizierà alle 10. Per registrarsi è sufficente andare al seguente link.

    L’agenda prevede:

      • keynote, in cui ho intenzione di parlarvi ad alto livello di Windows Azure, Internet Explorer 9, applicazioni ASP.NET Open Source e del programma Website Spark.
      • Windows Phone 7: sviluppare applicazioni con Silverlight per il Marketplace : Windows Phone è uno degli argomenti più caldi del momento e se conoscete Silverlight potete sfruttare le vostre conoscenze per pubblicare applicazioni per il marketplace, che ora chiamiamo Application Hub. Se avete sviluppato per precedenti versioni di  dispositivi mobili o venite da altre piattaforme sarà il momento migliore per impadronirvi delle “basi”, poi il resto vi garantisco sarà immediato. Avrete anche la possibilità di toccare con mano il sistema operativo Windows Phone 7, su dei prototipi o dispositivi reali.
      • Windows Phone 7: Un'applicazione reale di Vito Arconzo (MVP)
      • ASP.NET MVC 2.0 di Raffaele Fanizzi
      • Windows Azure Platform,  di Giuseppe Dimauro (MSDN Regional Director)
      • Inside Windows Azure AppFabric, di Fabio Cozzolino (MVP)

    Agenda Laboratorio

    Dalle 12, inoltre, sarà possibile provare le proprie applicazioni su un Windows Phone 7 reale.

    Per partecipare al Lab, portate le vostre applicazioni su chiavetta USB e mandateci una mail a itamsdn@microsoft.com indicando specificatamente la data dell'evento (3 Dicembre), la città (Bari) e quali applicazioni volete testare.

     

    L’agenda completa e aggiornata è disponibile sul sito della community a questo link.

    Vi aspetto.

  • Pietro Brambati Blog

    How to localize The Title in a WP7 Silverlight application

    • 4 Comments

    If you’re working on a Silverlight application for WP7 and you want to localize non only the resources  inside the application, but also the Title name of your application you could find some useful information on this post that make your app easily uploaded and certified on the App Hub (the marketplace).

    The result of you localization process will be as the following, in the emulator (you can test this on it) you’ll see the same app using different names for English, Italian, French, Spanish and German.

    In the following pictures you can see the difference, switching between  English and Italian.

    imageimage

    imageimage

    To switch, you have to go in settings menu of your emulator (or device) and change the language and than tap to screen to reboot it using the new configuration.

    How to localize

    Basically to localize the Title you have to create a resource-only project for the following languages in C++, build and add the assemblies to the root of you Silverlight project. To do this you have to use Visual C++ compiler (unfortunately the Visual C++ Express can’t be used, but if haven’t  a full copy of Visual Studio 2010 you can download a trial).

    I’ve create a simple Silverlight project and the resource-only C++ projects that you can download and easily personalize.

    You can see in following picture how it looks like:

    image

    The WP7SilverlightLocalizedSample depends on some C++ projects. You hadn’t to rename the C++, projects, they must be named exactly as they are, instead you can add you personal Silverlight project to the Solution.

    Every C++ project have some post-built rules that copy the resource assemblies in the root of the solution. In the Silverlight project I have “add a link” to the generated assemblies and I’ve set the properties for these seven files as “Content” in the Build Actions.

    If you now want to localize the names of your application in different languages, first start from the AppResLib, and right-click on the AppResLib.rc file , than view code, and you’ll enter in the resource file.

    The AppResLib is the assembly for the language-neutral.

    image

    In the resource file you can search for the two string “AppTitle” and “AppTileString” and change them as you prefer.

    image

    You have to do the same stuff for other assemblies:

    • AppRes0407 for German
    • AppRes0409 for English - United States
    • AppRes040c for French
    • AppRes0410 for Italy
    • AppRes0809 for English – UK
    • AppRes0c0a for Spanish

    How to setup the Silverlight Project

    Now that you have localized the resource-only assemblies you have to change the WMAppManifest.xml , that you probably have on the properties folder and change the two strings as in the following pictures:

    image

    So you have to put in App element the Title attribute as

    @AppResLib.dll,-100

    and the Title element in the TemplateType5 as

    @AppResLib.dll,-200

    and you’ve done!

    Conclusion

    If you want to localize the title of your Silverlight app for the marketplace you can use the sample I provided, if you’re using XNA for building game you can see the detailed Aaron Stebner’s post from here.

    Happy coding with Windows Phone 7.

Page 1 of 1 (2 items)