Daniel Rall <[EMAIL PROTECTED]> writes:
>>> > c) you can use four different $loc.text(..) methods: some of them
>>> > return specified default values if the keys are not found, some of them
>>> > use a different key prefix.
>>>
>>> This requires more effort on the part of the user, effort which I do
>>> not want as part of doing simple text lookups in the view. I much
>>> prefer to keep the context API dead simple, such as $l10n.MY_KEY,
>>> which in turn invokes LT.get("MY_KEY").
>>
>> You are right!!! This is a great quality of your tool and has to be the MAIN
>> method to retrieve a text...
>> but I think that some of my methods could be useful in some circumstances
>> (e.g. if you have set a page prefix and you want to retrieve a generic text,
>> with a different prefix)
>
> Agreed. There must definitely be a method for retrieving the values
> keyed by prefix-less keys when a key prefix is set.
What's the best interface for such a method? Here's a few
suggestions:
public String get(String key, String prefix)
public String get(String prefix, String key)
public String getWithoutPrefix(String key) // method name open to comment
Note that the default method's signature is as follows:
public String get(String key)
Daniel
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]