1

I am making an installer which, as well as showing the normal 'Select the language to use during the installation:' selection dialog, also needs to ask it again, showing that time a limited sub-set of those languages. And that inside a custom page.

i.e., our application has a product user-manual, but the available languages for the manual are only english, german, spanish (which is different from the application itself, which is fully translated for many more languages).

So I figured I need to make a combobox inside that custom page, and fill it with those languages I know are supported for that particular function, so that the user can choose which language of user-manual to install with the product.

I know I can get the 'code' of the selected language via:

ExpandConstant('{language}')

However, is it possible to:

  1. given a particular language code, return the 'LanguageName' for that language?

  2. Return the LanguageName for the selected language?

i.e., instead of 'en' I want 'English'.

and instead of having to manually fill my combo box with :

'English'
'Deutch' 
'Espanol'

I want to do something like

ExpandConstant('{en.LanguageName}')
ExpandConstant('{de.LanguageName}')
ExpandConstant('{es.LanguageName}')

Does any such method or 'expandable constant' exist that might suit my needs?

thanks in advance

Kara
  • 6,115
  • 16
  • 50
  • 57
svaens
  • 649
  • 7
  • 23
  • 1
    As far as I can see, there is no progress in this area since I have posted this [`hacky answer`](http://stackoverflow.com/a/13014839/960757). Except the [`ActiveLanguage`](http://www.jrsoftware.org/ishelp/topic_isxfunc_activelanguage.htm) function there's no other one working with languages. With the `ActiveLanguage` function you can get just the name (e.g. `en`) of the active language. There's no way to get list of the available languages in form of the name with its corresponding `LanguageName` (which is btw. read from the language file). – TLama Aug 29 '13 at 14:22
  • I wanted to say that you can't get the list of the available language names. You also cannot determine which file is used for a certain language name which in turn gives you no chance to read `LanguageName` key value from the language file (which you don't know). In other words, you can't do this unless you use preprocessor, or another technique storing the list of language name, language file pairs at compilation time. At runtime you are out of luck. – TLama Aug 29 '13 at 14:44
  • Yes. that is what I took from your comment. So what should be easy, is too hard. And I will just have to be content hard-coding the language names. – svaens Aug 29 '13 at 14:57
  • Actually yes. But the question is, how many people need to get list of available languages at runtime. In all cases, reading of parsed section values at runtime would be sometimes useful, sometimes even required. You [`can't even get list of files to be copied`](http://stackoverflow.com/a/11736521/960757) for instance. – TLama Aug 29 '13 at 15:19

0 Answers0