to get a list of controls having the i18n flag set you can perform the 
following query:

select * from nt:base where jcr:path like '%/dialogs/%' and i18n = 'true'

Probably the easiest is the following:
1) use ParagraphManager.getParagraphs() to get the list of paragraphs

2) to get the content having this paragraph assigned use
- select * from nt:base where mgnl:template = 'stkTextImage' --> will return 
the MetaData node
- set return type mgnl:contentNode to get the paragraphs

3) to get the dialog (with extends and references) not the config node do:
- DialogFactory.getDialogInstance(null, null, null, 
DialogHandlerManager.getDialogConfigNode(String));
- on the dialog iterate over getSubs() for tabs and getSubs() for the controls
- test for getConfigValue("i18n").equals("true")

I know this is not satisfying but those classes we undergo a complete rewrite 
in Magnolia 5.0.

In case you write such a groovy script, it would be nice if it found its way on 
the wiki ;-)

Philipp

On 12.08.2010, at 08:55, Jan Haderka wrote:

> 
> There is deprecated 
> DialogHandlerManager.getInstance().getDialogConfigNode(String dialogName), 
> but I'm not sure the dialog config node is all that you want ...
> 
> HTH,
> Jan
> 
> On Aug 11, 2010, at 11:11 PM, Peter Ranegger wrote:
> 
>> 
>> Hi,
>> 
>> the difference is that you are going to internationalize messages located in 
>> resource bundles, but my goal is to export all multilingual content that has 
>> been added through dialogs.
>> So what I currently do is traverse all content nodes in the website 
>> repository, get the template name and the corresponding dialog name.
>> Then I have to find out all fields of the dialog definition containing the 
>> i18n=true property and read the value of the property plus all language 
>> variations (_de, _ru) from the content node.
>> But how could I find all fields of a Dialog containing this i18n property. 
>> The API calls I found all need request/response objects, but thats not what 
>> I need. Is there something like DialogManager.getDialog(dialogName)???
>> 
>> Kind Regards,
>> Peter
>> 
>> Am 11.08.2010 16:27, schrieb Zdenek Skodik:
>>> 
>>> 
>>> On Wed, 2010-08-11 at 16:17 +0200, Zdenek Skodik wrote:
>>>> GUI internationalization
>>> it's more about modules than GUI which is internationalized into several
>>> languages for a while already...
>>> 
>>> 
>>> ----------------------------------------------------------------
>>> For list details see
>>> http://www.magnolia-cms.com/home/community/mailing-lists.html
>>> To unsubscribe, E-mail to:<[email protected]>
>>> ----------------------------------------------------------------
>>> 
>> 
>> 
>> ----------------------------------------------------------------
>> For list details see
>> http://www.magnolia-cms.com/home/community/mailing-lists.html
>> To unsubscribe, E-mail to: <[email protected]>
>> ----------------------------------------------------------------
> 
> 
> 
> ----------------------------------------------------------------
> For list details see
> http://www.magnolia-cms.com/home/community/mailing-lists.html
> To unsubscribe, E-mail to: <[email protected]>
> ----------------------------------------------------------------

Cheers
- Philipp


----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to