PureMVC
Home
About
Code
Docs
FAQ
Forums
News
Showcase
Contact
Jobs
Welcome,
Guest
. Please
login
or
register
.
May 19, 2013, 09:02:26 AM
News:
ATTENTION: Spambots must die! Humans must visit
http://contact.futurescale.com
to request forum access.
PureMVC Architects Lounge
Announcements and General Discussion
Architecture
Multilingual views
Pages: [
1
]
« previous
next »
Author
Topic: Multilingual views (Read 936 times)
Sammi
Courseware Beta
Full Member
Posts: 45
Multilingual views
«
on:
June 15, 2010, 02:43:49 PM »
Hi,
I am using my home brewed method for view localization. It is simple and quite effective but I am still thinking of ways to simplify and thought I would get other people's opinion on a particular aspect of my method.
To simplify things I am not talking about the localization of the content - but interface elements like button labels and such.
Here is the flow right now:
1) I have an XML document with all labels
2) I have a Proxy that loads them and turns them into a smart vo
3) The smart vo has a method to return a label identified by an id like SAVE or CLOSE
4) My mediators collect the labels required for their views and pass them to the views as dictionaries
5) The views use the dictionary to update all labels.
I have been thinking of skipping step 4 and 5 and just throw the whole smart vo to the views for simplicity.
The problem with that approach is that all the views get ALL the labels. So even a simple view like "LogoutView" that only needs one label would get the vo with maybe 100 labels.
What do you think? Maybe for an application that has only few views this is ok but what if the app has a lot of views? Could/should I find a way to pass just a reference to the vo?
Best,
Sammi
«
Last Edit: June 16, 2010, 06:59:47 AM by Sammi
»
Logged
puremvc
Global Moderator
Hero Member
Posts: 2790
Re: Multilingual views
«
Reply #1 on:
June 16, 2010, 06:18:42 AM »
Yes. I hate view component localization by having to call some outside actor that is in charge of having the labels. Much better for it to be on the data carrier that holds the labels and can translate them on the spot. There's to stretch of responsibility there, and it guarantees all actors coming in contact with the label vo can get localized labels without having to consult another central actor.
-=Cliff>
Logged
Sammi
Courseware Beta
Full Member
Posts: 45
Re: Multilingual views
«
Reply #2 on:
June 16, 2010, 07:04:51 AM »
Thanks,
so as long as I don't have hundreds of views and hundreds of labels I just pass the whole vo to the views. It simplifies things and then if a view suddenly requires a new label I don't have to modify the mediator to pass that label. The mediator just passes the vo with all the labels in the application.
Best,
Sammi
Logged
Pages: [
1
]
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Announcements and General Discussion
-----------------------------
=> General Discussion
=> Getting Started
=> Architecture
=> Public Demos, Tools and Applications
===> Fabrication
-----------------------------
PureMVC Manifold
-----------------------------
=> Port Authority
===> Contributor Central
===> Client Side
===> Server Side
=> Port to AS2
===> Standard Version
=====> Bug Report
=====> Demos and Utils
=> Port to AS3
===> Standard Version
=====> Bug Report
=====> Demos and Utils
===> MultiCore Version
=====> Bug Report
=====> Demos and Utils
=> Port to ColdFusion
===> Standard Version
=====> Bug Report
=====> Demos and Utils
=> Port to C++
===> MultiCore Version
=====> Demos and Utils
=====> Bug Report
=> Port to CSharp
===> Standard Version
=====> Bug Report
=====> Demos and Utils
=> Port to Dart
===> MultiCore Version
=====> Bug Report
=====> Demos and Utils
=> Port to Haxe
===> Standard Version
=====> Bug Report
=====> Demos and Utils
===> MultiCore Version
=====> Bug Report
=====> Demos and Utils
=> Port to Java
===> Standard Version
=====> Bug Report
=====> Demos and Utils
===> MultiCore Version
=====> Bug Report
=====> Demos and Utils
=> Port to JavaScript
===> Demos and Utils
===> Native JS Branch
=====> Bug Report
===> PrototypeJS Branch
=====> Bug Report
===> Objs Branch
=====> Bug Report
===> MooTools Branch
=====> Bug Report
===> ExtJS Branch
=====> Bug Report
=> Port to Objective C
===> Standard Version
=====> Bug Report
=====> Demos and Utils
=> Port to Perl
===> Standard Version
=====> Bug Report
=====> Demos and Utils
===> MultiCore Version
=====> Bug Report
=====> Demos and Utils
=> Port to PHP
===> Standard Version
=====> Bug Report
=====> Demos and Utils
===> MultiCore Version
=====> Bug Report
=====> Demos and Utils
=> Port to Python
===> Standard Version
=====> Bug Report
=====> Demos and Utils
===> MultiCore Version
=====> Bug Report
=====> Demos and Utils
=> Port to Ruby
===> Standard Version
=====> Bug Report
=====> Demos and Utils
=> Port to TypeScript
===> Standard Version
=====> Bug Report
=====> Demos and Utilities
===> MultiCore Version
=====> Bug Report
=====> Demos and Utilities
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Powered by SMF 1.1.11
|
SMF © 2006-2007, Simple Machines LLC
Loading...
Copyright © 2006-2008 Futurescale, Inc.