How to create MVP apps with static texts in multiple languages?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to create MVP apps with static texts in multiple languages?

Jonas Öhrn
I want my texts displayed in the selected language in my MVP
application.
The static text should be read from specific language specific files
into the image, probably into a pool dictionary or something. I can
then refer to a text using a logical identifier for each static text
item.

My biggest concern is the views I create in the view composer. How can
I create only one instance and then apply changes to specific static
texts.

Is there a "Dolhin pattern" to use here? If not maybe there should be
one!?


Reply | Threaded
Open this post in threaded view
|

Re: How to create MVP apps with static texts in multiple languages?

Bill Schwab-2
Jonas,

> I want my texts displayed in the selected language in my MVP
> application.
> The static text should be read from specific language specific files
> into the image, probably into a pool dictionary or something. I can
> then refer to a text using a logical identifier for each static text
> item.
>
> My biggest concern is the views I create in the view composer. How can
> I create only one instance and then apply changes to specific static
> texts.

Two things come to mind (there could easily be better solutions):

(1) "push" text into named static text controls, probably from the parent
presenter's #onViewOpened
(2) subclass the static text control and have it "pull" the correct text.

The push solution is probably easiest to create and I _think_ would be less
likely to cause problems with STB conversion etc.

Hopefully somebody has a solution more easily mistaken for magic :)

Have a good one,

Bill

--
Wilhelm K. Schwab, Ph.D.
[hidden email]