Please do not highjack threads. Even if you remove the content, the mail 
headers stay in and result is your question appears as reply to the original 
thread and is not visible in the menu and will likely be not answered at all 
... you can see the result  at 
http://old.nabble.com/mainBar-does-not-show-in-templating-tutorial-td30037337.html

now to answer your question either the site can't be resolved properly at that 
point in which case you should see an error message in the log file (either "No 
STK aggrigation state found." or  "No site set for this request.") or the site 
was found and it has no i18n configuration in which case you would need to 
switch on debugging on ETKI18nContentSupport to see anything. ... or the site 
that was found for this request is something like Default that has only english 
configured as the language.

actually it might be that when the dialog is being saved there is no site 
(other then default) available at that point, because the request url goes to 
the admin central dialog rather then to your site content.
Assuming you are running on an instance with i18nAuthoringSupport enabled the 
dialog itself should be already prepared for the language selected in the main 
bar of the page ... so in theory you can get any control and look at its suffix 
... if that's the case, I18nAuthoringSupport should probably expose the locale 
it chooses for the dialog somewhere.

HTH,
Jan

On Oct 26, 2010, at 2:49 PM, Benoit Segaert wrote:

Hi all,

I am currently working on the migration of the Excel module to Multilanguage 
and STK. 

For the management of the pre-rendered Excel table, we need an access to the 
selected language in website.
But in the savedHandler class, the I18nContentSupportFactory.getI18nSupport() 
always return English locale!

The SaveHandler class called during the saving of the dialog is the following :

public class ExcelTransformerSaveHandler extends UUIDSaveHandler {
        ...
  private void removePreRenderedProperty(String name, Content node) throws 
RepositoryException {
       String language = 
I18nContentSupportFactory.getI18nSupport().getLocale().getLanguage();
       ...
  }
}

Language is always English.

I need it to delete the corresponding pre-rendered property depending of the 
language.
How can I access to the website language?

BenoƮt



----------------------------------------------------------------
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]>
----------------------------------------------------------------

Reply via email to