DotNetNuke Module Localization Guide - dnn- Guide for DotNetNuke Modules Testing module...

download DotNetNuke Module Localization Guide - dnn- Guide for DotNetNuke Modules Testing module localizability Vicen Masanas Version 1.0.0 Last Updated: March 20, 2006 Category: DotNetNuke

of 22

  • date post

    18-Mar-2018
  • Category

    Documents

  • view

    216
  • download

    3

Embed Size (px)

Transcript of DotNetNuke Module Localization Guide - dnn- Guide for DotNetNuke Modules Testing module...

  • Localization Guide for DotNetNuke Modules Testing module localizability

    Vicen Masanas

    Version 1.0.0

    Last Updated: March 20, 2006

    Category: DotNetNuke v3.x, v4.x

  • 1

    DotNetNuke Module Localization Guide

    Copyright 2003-2005 Perpetual Motion Interactive Systems, Inc. All Rights Reserved.

    Information in this document, including URL and other Internet Web site references, is

    subject to change without notice. The entire risk of the use or the results of the use of

    this document remains with the user.

    The example companies, organizations, products, domain names, e-mail addresses,

    logos, people, places, and events depicted herein are fictitious. No association with any

    real company, organization, product, domain name, email address, logo, person,

    places, or events is intended or should be inferred.

    Complying with all applicable copyright laws is the responsibility of the user. Without

    limiting the rights under copyright, no part of this document may be reproduced,

    stored in or introduced into a retrieval system, or transmitted in any form or by any

    means (electronic, mechanical, photocopying, recording, or otherwise), or for any

    purpose, without the express written permission of Perpetual Motion Interactive

    Systems, Inc. Perpetual Motion Interactive Systems may have patents, patent

    applications, trademarks, copyrights, or other intellectual property rights covering

    subject matter in this document. Except as expressly provided in any written license

    agreement from Perpetual Motion, the furnishing of this document does not give you

    any license to these patents, trademarks, copyrights, or other intellectual property.

    Copyright 2005, Perpetual Motion Interactive Systems, Inc. All Rights Reserved.

    DotNetNuke and the DotNetNuke logo are either registered trademarks or

    trademarks of Perpetual Motion Interactive Systems, Inc. in the United States and/or

    other countries.

    The names of actual companies and products mentioned herein may be the trademarks

    of their respective owners.

  • 2

    DotNetNuke Module Localization Guide

    Copyright 2003-2005 Perpetual Motion Interactive Systems, Inc. All Rights Reserved.

    Abstract

    This document contains a list of items to verify to assure a module supports as many DotNetNuke localization features as available on the Core Framework.

  • 3

    DotNetNuke Module Localization Guide

    Copyright 2003-2005 Perpetual Motion Interactive Systems, Inc. All Rights Reserved.

    Contents

    Why localize? ...................................................................... 5

    Introduction .................................................................................................................... 5

    Database .............................................................................6

    DotNetNuke Controls..........................................................8

    Using built-in localization features................................................................................. 8

    Display missing keys ....................................................................................................... 8

    Localize text labels .......................................................................................................... 9

    Module Control Title ...................................................................................................... 11

    Datagrids ........................................................................................................................12

    JavaScript Messages ......................................................................................................13

    Messages on code...........................................................................................................14

    DotNetNuke Global Shared Resources .......................................................................... 17

    Module Help................................................................................................................... 17

    Action Menu Items.........................................................................................................18

    Images ............................................................................................................................19

    Additional Information.....................................................20

    Errors and Omissions ................................................................................................... 20

  • 4

    DotNetNuke Module Localization Guide

    Copyright 2003-2005 Perpetual Motion Interactive Systems, Inc. All Rights Reserved.

    Appendix A: Document History ........................................ 21

  • 5

    DotNetNuke Module Localization Guide

    Copyright 2003-2005 Perpetual Motion Interactive Systems, Inc. All Rights Reserved.

    Why localize?

    Introduction

    Since version 3 DotNetNuke provides a rich set of features to allow static localizability of

    modules. By static information we mean all data that is not subject to user modification

    and that can be considered for the most part as not changeable. This includes text labels,

    error and information messages, help, and graphics that are spread throughout the user

    interface of the application.

    As DNN is used in more and more countries it is very important to provide modules with

    good support for international users. Otherwise we are limiting our potential user base to

    that using English as their base language.

    Through the rest of this document you will get to know some of the most common

    problems found in many modules and how to solve them.

  • 6

    DotNetNuke Module Localization Guide

    Copyright 2003-2005 Perpetual Motion Interactive Systems, Inc. All Rights Reserved.

    Database

    Data types

    Always use data types that support Unicode data. In SQL Server these are:

    - nchar

    - nvarchar

    - ntext

    Verify all character fields use these data types instead of char, varchar and text.

    Where to check

    - Database scripts included in the module install package. The source for these files is

    usually found in

    - \\DesktopModules\\

    Providers\DataProviders\SqlDataProvider\*.SqlDataProvider

    What to check

    - Fields defined in CREATE TABLE statements

    - STORED PROCEDURE parameters

    - Variables defined in stored procedures (DECLARE statements)

  • 7

    DotNetNuke Module Localization Guide

    Copyright 2003-2005 Perpetual Motion Interactive Systems, Inc. All Rights Reserved.

    Collation clauses

    If you use SQL Server default features to write the scripts that will create the module

    tables you will usually see that it includes collation clauses for every database field.

    Unless you want to force the collation on any given field to something specific it is good

    practice to remove all collation clauses in the table creation scripts in order to force it to

    use the default collation used by the database. This way, the module setup will not

    overwrite database defaults and will use whatever setup the database administrator has

    decided.

    Where to check

    - Database scripts included in the module install package. The source for these files is

    usually found in

    \\DesktopModules\\

    Providers\DataProviders\SqlDataProvider\*.SqlDataProvider

    What to check

    - COLLATE clauses in table creation scripts.

    A sample bad code is:

    [Title] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL

    This should be corrected to:

    [Title] [nvarchar] (255) NOT NULL

  • 8

    DotNetNuke Module Localization Guide

    Copyright 2003-2005 Perpetual Motion Interactive Systems, Inc. All Rights Reserved.

    DotNetNuke Controls

    Using built-in localization features

    Normal DNN controls will inherit from PortalModuleBase, which has built-in support

    for localization. If the module contains any extra user controls they should inherit from

    UserControlBase to be able to use the same localization features. There is also a

    PageBase class that can be used to provide localization to any extra aspx page the

    module contains.

    Where to check

    - All user controls and pages (*.ascx, *.aspx)

    What to check

    - Classes inherit from DNN base classes (PortalModuleBase, UserControlBase, and

    PageBase)

    Display missing keys

    Each DotNetNuke control in the module should include its own resource file for

    localizable items. If there are many items in these files it is usually difficult to keep them

    synchronized with the code.

    To be able to detect any missing resource keys during development DotNetNuke

    provides a way to clearly identify missing resources in any file. Open web.config and set

    the ShowMissingKeys key to true:

  • 9

    DotNetNuke Module Localization Guide

    Copyright 2003-2005 Perpetual Motion Interactive Systems, Inc. All Rights Reserved.

    This will display a message at run time for any missing resourcekey found in any control.

    This flag should only be used in development or testing installations. It is recommended

    that you set it to false on the production installation.

    Where to check

    - web.config

    What to check

    - ShowMissingKeys value