Home All Groups Group Topic Archive Search About

implicit vs explicit localization

Author
17 Oct 2006 4:58 PM
David Thielen
Hi;

Any comments on which is the better approach? And why?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm

Author
18 Oct 2006 9:12 AM
Steven Cheng[MSFT]
Hello Dave,

Would provide some further explanation on the implicit and explicit
localization? Do you mean statically through declarative directive and
attribute in template verus programmatically localize through code?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.
Author
18 Oct 2006 4:29 PM
David Thielen
Hi;

I was talking about the two approaches listed in
http://msdn2.microsoft.com/en-us/library/ms228093.aspx

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm




Show quoteHide quote
"Steven Cheng[MSFT]" wrote:

> Hello Dave,
>
> Would provide some further explanation on the implicit and explicit
> localization? Do you mean statically through declarative directive and
> attribute in template verus programmatically localize through code?
>
> Sincerely,
>
> Steven Cheng
>
> Microsoft MSDN Online Support Lead
>
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>
>
Author
19 Oct 2006 4:03 AM
Steven Cheng[MSFT]
Thanks for your reply Dave,

Well, IMO, I think implicit and explicit localization has their own focus
and strengh respectively.

For implicit localization, it rely on the new Localization Page feature
provided by ASP.NET 2.0/VS 2005, you can generate page specific resx files
for each page, and in that file, it will only contains resourcekeys
associated with controls in the corresponding page.  And for the
"meta:ResourceKey" of the certain control on a localized page, they're
always refering to the resource file associated with that page, but not
other resource files.

While for explicit localization, it is more flexible, you can use
<%$Resource %> expression to load resource value from any resource file in
the application, not limietd to the resource file associated with the page
only.  For example, you may store all the error message resource values in
a single global resource file in the application and these messages will be
used among multiple pages, here use <%$Resource %> expression is the
prefered approach. do you think so?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.
Author
19 Oct 2006 3:27 PM
David Thielen
What bothers me with the local files is I then end up with 28 aspx pages * 21
languages whcich gives me 588 files - all in 1 directory. If it did language
subdirectories local would be a great solution.

There is also the problem with localizing GridView - it looks using localize
means I need the same text in each file that matches an aspx file that has
the GridView. So I have to repeat the same text over and over.

I'm not wild on any of the solutions as I see them.

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm




Show quoteHide quote
"Steven Cheng[MSFT]" wrote:

> Thanks for your reply Dave,
>
> Well, IMO, I think implicit and explicit localization has their own focus
> and strengh respectively.
>
> For implicit localization, it rely on the new Localization Page feature
> provided by ASP.NET 2.0/VS 2005, you can generate page specific resx files
> for each page, and in that file, it will only contains resourcekeys
> associated with controls in the corresponding page.  And for the
> "meta:ResourceKey" of the certain control on a localized page, they're
> always refering to the resource file associated with that page, but not
> other resource files.
>
> While for explicit localization, it is more flexible, you can use
> <%$Resource %> expression to load resource value from any resource file in
> the application, not limietd to the resource file associated with the page
> only.  For example, you may store all the error message resource values in
> a single global resource file in the application and these messages will be
> used among multiple pages, here use <%$Resource %> expression is the
> prefered approach. do you think so?
>
> Sincerely,
>
> Steven Cheng
>
> Microsoft MSDN Online Support Lead
>
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>
Author
20 Oct 2006 9:25 AM
Steven Cheng[MSFT]
Thanks for the reply Dave,

Yes, the VS IDE will create a App_LocalResource sub dir for each Folder in
your ASP.NET application, so if you have lots of pages in a single folder,
the App_LocalResource will contains plenty of resource files. However, at
precompile time, they'll be precompiled as assemblies.

For GridView, generally, we suppose that each page that contains GridView
will has different text setting in it. If you have multiple GridView in
different pages that have common text string setting, it does become
redundant to use Local Resource file. Maybe using shared resoruce file
would be more appropriate. 

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.