How to make a multi variable? (Resolved)


#1

Hello,

I work on my script i search a variable for multi language

$noop(★ EDIT THIS TO SET LANGUAGE ★)
$set(_LangScript,FR)
$noop(
OPTION:
EN = ENGLISH
FR = FRANÇAIS
)

$noop(★ CUSTOM SUBFOLDER BY LANGUAGE ★)
$noop(★ ENGLISH ★)


$set(_LOfficialEN,Official/)
  
$noop(★ FRANÇAIS ★)

$set(_LOfficialFR,Officiel/)

$noop(########## My Problem #############)

$noop(★ CUSTOM SUBFOLDER BY RELEASES STATUS ★)
$set(ROfficial,_LOfficial%_LangScript%)
$noop(########## End of My Problem #############)

$noop(########## DETECT RELEASE STATUS ###############################)
$if($eq(%releasestatus%,official),
   $set(_isOfficial,1)

$set(StatusRelease1,
  $if($eq(%_isOfficial%,1),%ROfficial%,
    $if($eq(%_isPromo%,1),%RPromo%,
      $if($eq(%_isBootleg%,1),%RBootleg%,
        $if($eq(%_isPseudoR%,1),%PseudoRDir%,
        )
      )
    )
  )
)
$if2(%albumartist%,%artist%)/%StatusRelease1%/$if($ne(%albumartist%,),%album%/)$if($gt(%totaldiscs%,1),%discnumber%-,)$if($ne(%albumartist%,),$num(%tracknumber%,2) ,)$if(%_multiartist%,%artist% - ,)%title%

output: /MyMusic/Compilation/_LOfficialFR/HELP!/…

I had found a solution but I lost everything after an error.
Like this:

$set(ROfficial,$if(_LOfficial%_LangScript%,))

Anyone have an idea?


#2

I don’t fully get your problem. What exactly do you want for the subfolder name?


#3

Hello,

I would like to create subfolders according to the chosen language.

ex: “Broadcast” in English, "Diffuision in French, “Transmitido” in Spanish, etc…

I had found a solution that was to call a variable that referred to another variables containing the translation:

$noop(★ This variable define the language ★)
$set(_LangScript,FR)

$noop(★ This variable define the translation ★)
    $noop(★ ENGLISH ★)
    $set(_LOfficialEN,Official/)

    $noop(★ FRANÇAIS ★)
    $set(_LOfficialFR,Officielles/)

$noop(★ This variable must call _LOfficialFR ★)

$set(ROfficial,_LOfficial%_LangScript%)

$noop(★ This variable defined if the release is official or not and calls the one above ★)
 $if($eq(%_isOfficial%,1),%ROfficial%

The software understands that “ROfficial” refers to “_LOfficial% _LangScript%” but does not understand that it is another variable named “_LOfficialFR”.
the output gives ./_LofficialFR/. instead of ./Officiel/.

Thank you for your reply


#4

_LOfficial in this context is just a normal text. Try using $get to get a variable 's value by name:

$set(ROfficial,$get(_LOfficial%_LangScript%))

#5

Nothing! Nothing, as if it did not exist.
edit: I Found… Again in 2 step!

$set(_LOfficial,_LOfficial%_LangScript%)
$set(ROfficial,$get(_LOfficial%_LangScript%))
How to merge?


#6

I’m tired, very tired. I Remember now:

I modified the translation variable for many test, so:

ROfficial Must call ROfficial%LangScript% not _LOfficial%LangScript% and TADAAAAA!

$noop(★ EDIT THIS TO SET LANGUAGE ★)
$set(_LangScript,FR)
$noop(
OPTION:
EN = ENGLISH
FR = FRANÇAIS
)

$noop(★ CUSTOM SUBFOLDER BY LANGUAGE ★)
$noop(★ ENGLISH ★)


$set(ROfficialEN,Official/)
  
$noop(★ FRANÇAIS ★)

$set(ROfficialFR,Officiel/)

$noop(########## My Problem is solved #############)

$noop(★ CUSTOM SUBFOLDER BY RELEASES STATUS ★)
$set(ROfficial,$get(ROfficial%_LangScript%))
$noop(########## End of My Problem #############)

$noop(########## DETECT RELEASE STATUS ###############################)
$if($eq(%releasestatus%,official),
   $set(_isOfficial,1)

$set(StatusRelease1,
  $if($eq(%_isOfficial%,1),%ROfficial%,
    $if($eq(%_isPromo%,1),%RPromo%,
      $if($eq(%_isBootleg%,1),%RBootleg%,
        $if($eq(%_isPseudoR%,1),%PseudoRDir%,
        )
      )
    )
  )
)
)
$if2(%albumartist%,%artist%)/%StatusRelease1%/$if($ne(%albumartist%,),%album%/)$if($gt(%totaldiscs%,1),%discnumber%-,)$if($ne(%albumartist%,),$num(%tracknumber%,2) ,)$if(%_multiartist%,%artist% - ,)%title%

This trick can serve someone.