Topic: Replacing hard text with translation.ini strings
in a .js file there is hard coded text in a few instances where I want to replace the text with a string from translations.ini because I'm trying to manage all text from within translation.ini (later I'll be translating my site to offer language options.
Using these 3 examples:
1) var msg = "Your job has been posted.";
2) if(confirm('Delete this job ad?'))
3) $("a#new_location_label").html("Select an option");
I'm trying to replace the text with
1) var msg = "{$translations.notice.posted}";
2) if(confirm('{$translations.notice.delete}'))
3) $("a#new_location_label").html("{$translations.notice.select}");
but I'm making mistakes with the syntx when inserting
{$translations.notice.posted}
{$translations.notice.delete}
{$translations.notice.select}
Could someone show me how to do this in these examples?
Thank you.
Tokyoj
"You can't build a reputation on what you're going to do." (Henry Ford)
"Insanity is doing the same thing over and over, expecting different results." (Albert Einstein)