cancel
Showing results for 
Search instead for 
Did you mean: 

Supported languages

mrgrechkinn
Champ in-the-making
Champ in-the-making
Hello,

How I can get list of supported languages via webscript?
6 REPLIES 6

mitpatoliya
Star Collaborator
Star Collaborator
I guess if you have the java backed webscript and once you have control in that class you can work with any language supported by java by setting proper Locale.
Please clarify if this is not you mean.

mrgrechkinn
Champ in-the-making
Champ in-the-making
I just need gets languages declared in web-client-config.xml via webscript.


LanguagesConfigElement langConfig = (LanguagesConfigElement)configService.getConfig("Languages").getConfigElement(LanguagesConfigElement.CONFIG_ELEMENT_ID);
for (String locale : langConfig.getLanguages()) {
……
}

But it Java, not js. How I can write same but on js.

mitpatoliya
Star Collaborator
Star Collaborator
Check out this js file it shows you how to read the configs in js file of your share from installation.

WEB-INF/classes/alfresco/site-webscripts/org/alfresco/config.lib.js

mrgrechkinn
Champ in-the-making
Champ in-the-making
I tried create a same script, but a have "null" object when execute:

config.scoped["Languages"]["languages"]

Regards, Eugene

mrgrechkinn
Champ in-the-making
Champ in-the-making
I tried investigate it, and it seems:

1)from alfresco webscript config variable use "spring-webscript-config.xml" and custom.xml
2)from share webscript config variable use "share-config.xml" and -custom.xml

When I tried debug remotly for config.getScoped["Languages"] BaseConfigService class has only "Remote" and "Server" areas.
So for now, I don't know what do next.

Regards, Eugene.

mrgrechkinn
Champ in-the-making
Champ in-the-making
up!