Help - Search - Members - Calendar
Full Version: OSD using 2 languages
Hydrogenaudio Forums > Hosted Forums > foobar2000 > 3rd Party Plugins - (fb2k)
wilhelmtell
Just wanted to share with you my On-Screen Display configuration. It is a small enhancement to the default conf.

A considerable share of my music is in Hebrew. That's why I thought it would be nice if the OSD would read Next in English when the next track is in English, and אח"כ (the Hebrew word for Next) when the next track is in Hebrew.

It is important to note before trying it out that the whole thing depends on the _heb tags; i.e., TITLE_HEB, ARTIST_HEB and ALBUM_HEB. I added these tags to my Hebrew music, in order to preserve the English tag values for other media players that would prefer tags in plain English. If these tags don't exist in a file, the standard tags are read. If they do, it's because they contain the Hebrew values and they will be used, in higher priority.

The last line is the line that you should put in the Next Track edit box, right beneath the Format edit box.

CODE

// ******************************
// BEGIN CONFIGURATION
// This is the configuration area. Please _do_ configure these variables
// to suit your own needs and preference!

// ******************************

// set colors
// plug hex numbers into B(lue)G(reen)R(ed)
// ******************************
$puts(current_song_color,00ffff|000000)
$puts(next_song_color,42b265|000000)
$puts(progbar_fg_color,$get(next_song_color))
$puts(progbar_bg_color,229245|000000)

// ******************************
// set variables
// ******************************
$puts(progbar_fg_symb,$get(progbar_fg_color)'█')
$puts(progbar_bg_symb,$get(progbar_bg_color)'█')
$puts(spacer_symb,' ')
$puts(spacer_width,2)

// ******************************
// END CONFIGURATION
// That's it, thank you! I'll take it from it here...
// ******************************

// prepare variables
$puts(spacer,$repeat($get(spacer_symb),$get(spacer_width)))

// begin display
// current song
$get(current_song_color)

// default display.
//[%artist%]$if(%title%,[' / '%album%]' / '%title%,%_filename%)$if(%_ispaused%,' [paused]')

// my custom display.
// displays the hebrew names if exist, otherwise default.
$if2([%artist_heb%],[%artist%])$if(%title_heb%,[' / '%album_heb%]' / '%title_heb%,$if(%title%,[' / '%album%]' / '%title%,%_filename%))$if(%_ispaused%,' [paused]')

// percentage
// this line displays only if not in beginning of song (using ascii char 219)
$if(%_time_elapsed_seconds%,[$crlf()$get(progbar_fg_color)$muldiv(%_time_elapsed_seconds%,100,%_time_total_seconds%)'%'])

// progress bar
$if(%_time_elapsed_seconds%,[$get(spacer)$progress2(%_time_elapsed_seconds%,%_time_total_seconds%,40,$get(progbar_fg_symb),$get(progbar_bg_symb))])

// time elapsed / time total
$if(%_time_elapsed_seconds%,[$get(progbar_fg_color)$get(spacer)%_time_elapsed%'/'%_time_total%])

// next song
$if([%_next%],$crlf()$get(next_song_color)%_next%)

// default "next track" pattern.
// place it in the Next Track field below if you wish to set it to the default.
//[%artist%]$if(%title%,[' / '%album%]' / '%title%,%_filename%)

//The next line is to be put in the Next Track edit box
$if([%artist_heb%],$puts(next,'אח"כ: '),$puts(next,'Next: '))$get(next)$if2([%artist_heb%],[%artist%])$if(%title_heb%,[' / '%album_heb%]' / '%title_heb%,$if(%title%,[' / '%album%]' / '%title%,%_filename%))
Andreasvb
I use something similar.
And almost the same for the TTS plugin, can't have her speak other than english tongue.gif

CODE
$char(3)c080ff|ffffff$char(3)
[$if(%TRANS_ARTIST%,%TRANS_ARTIST%,%artist%) - ]$if(%TRANS_TITLE%,%TRANS_TITLE%,$if(%title%,%title%,%_filename%))[' ['%_time_total%']']
[$char(10)$char(3)c080ff|ffffff$char(3)%album%]
$if(%_ispaused%,$char(10)$char(3)ffffff|c080ff$char(3)'[ p a u s e d ]'$char(10)
$char(3)c080ff|ffffff$char(3)['['%album%[ #[%disc%/]$num(%tracknumber%,2)]'] '],

$ifgreater(%_time_elapsed_seconds%,5,$char(10)$char(3)ffffff|f394d9$char(3)
'\'$progress2(%_time_elapsed_seconds%, %_time_total_seconds%,
$len([%artist% -]$if(%title%,%title%,%_filename%)[%_time_total%]),'_',' ')'/',))


moderation: changed literal ETX character to the more browser-friendly $char(3) representation
seethru
out of curiosity, what does this plugin do?
Shadikka
user posted image

That text at the bottom of the screen..
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.