This topic is locked

Lookup wizard Display Field accordin to the Language

3/10/2010 10:47:35 AM
PHPRunner General questions
N
netmedia59 author

Hello,
Is there a way, for an ADD or EDIT, and for a Lookup wizard to choose the Display field according to the selected language
For example in a dropdown field :

If English is the selected language, the Display field would be Descr_GB

If French is the selected language, the Display field would be Descr_FR

etc.
Thank You very much for any help
Olivier

Lille (FRANCE)

N
netmedia59 author 3/11/2010

Hello,
Is there a way to do it ?

  • Snippet ?
  • Custom command ?
  • Javascript ?
    Thanks in advance ?

    Do I have to be more precise ?
    Olivier

Sergey Kornilov admin 3/11/2010

Olivier,
here is a suggestion how you can make it work.
You can store all labels in the same field storing language id in another field.

Example:

Name Language

-------------------------

eng label1 English

eng label2 English

fr label1 French

fr label2 French


Then you can add the following WHERE clause:

" Language='".$_SESSION["language"]."'"
N
netmedia59 author 3/11/2010

Hey,
Thanks !

That's a nice idea

Haven't thought it that way but that's all I need !
Thanks again
Olivier



Olivier,
here is a suggestion how you can make it work.
You can store all labels in the same field storing language id in another field.

Example:

Name Language

-------------------------

eng label1 English

eng label2 English

fr label1 French

fr label2 French


Then you can add the following WHERE clause:

" Language='".$_SESSION["language"]."'"