Cairaguas (cairaguas) wrote in songlations,

Resource Links (Translation Resources, Grammar Resources, Similar Projects, Perl Code, etc.)

Because the Introduction Post was getting kind of long with all the links I was adding...

Translation Resources:

Monolingual dictionaries and language resources:

Bilingual or multilingual dictionaries and language resources:

Etymology websites:

Grammar Resources:

Read/Listen to Spanish:

I am a science major and I like to tell my parents what I am learning in school. I need more than just the layperson Spanish science vocabulary for that. I recommend SoloCiencia's mailing list. Spanish Wikipedia and newspapers are also good.

Culture Podcasts:
  • Latino USA - a podcast by National Public Radio (NPR) by and for Latinos. It is a great resource for learning more about Latino culture.

Similar Translation Projects by Other People:

Do you know of other projects with side-by-side translations? Let me know!

Perl Code:

One of the more menial tasks before songs are ready to post is making sure that every line begins in uppercase. I wrote a Perl script to do it for me. The code has comments which begin with the pound (#) symbol to describe what is going on. (2012 version) requires input file song_input.rtf (2016 version with improved special character handling) requires input file song_input.rtf

Pro: This program does not ruin special characters or output them as question marks or boxes. It leaves special characters alone and transfers them unaltered to the output file.
Con: This program does not transform accented first letters so you need to check the program output manually.

How to use on Windows:
First download and install Perl (free and legitimate software). Once installed, copy the code above into Notepad and save as filetype "All Files" (to avoid saving with the .txt extension) and name the file in the folder where you installed Perl (probably C:\Perl or C:\Perl64). To bring up the program, open the Windows command box by using WindowsKey + R and typing cmd into the "Run" window that comes up. Navigate to the folder where you installed Perl by typing something like this into the command line:

cd C:\Perl

...or wherever your Perl folder is located. Hit enter. Now type this into the command line:


The program will run. It will ask you if you want to open song_input.rtf. Follow the instructions. At the end, the program will ask you if you want to open song_output.rtf. If you don't want to open the input and output files from the command window now, you can open them later by finding them in your Perl folder. The .rtf file extension is a rich text file, the most open-source text file you can have while still maintaining font, italics, bold, special characters, and other basic formatting that gets lost with the plain .txt text file. If you want to edit other file types (e.g. .docx), just switch the file extension in the script.

How to use on Mac:
Mac OS X already has Perl pre-installed. Skip the installation step and just save the script, then run it. The input and output files will be generated in the same folder you saved the script. However, you might need to manually create the song_input.rtf file and tell the program no when it asks to open it from within the script. The script will still run on the rich text file, but it will skip the part that opens WordPad. I haven't tested that part on a Mac, so I don't know if it produces an error. After the script is finished, open the output file song_output.rtf manually as well.

Perl code edit notes:
Published: November 12, 2010
Very simple. Transformed first letter of every line into uppercase except for lines that had a url or special characters in the beginning.

Modified: January 26, 2011
Now transforms the first letter after a special character (such as ¿ or ¡) and after the italics <i> tag.

Modified: July 1, 2012
Now the program can open the necessary input and output Wordpad files in the foreground, directly from the command window. If you don't want this, comment out (add a hashtag before) the system() functions or select no to the prompt "Open song_input.rtf now? (y=1/n=0)" at the beginning, then select no to the prompt "Open song_output.rtf now? (y=1/n=0)" at the end.

Modified: November 15, 2016
Cleaned up code formatting and improved the special character reading for Windows 10. If you don't have wordpad.exe, either replace the program exe link in the system() functions with another program that reads rich text files, or select no at prompts asking to open .rtf files. The code will still run and the output will still be created, but you will need to open files manually.

Resources were last edited 3/12/2022 to add my last version of the perl code.
Tags: #adds, #breaks, #currently, #defined, #ends, #if, #in, #just, #last, #not, #open, #place, #press, #removes, #run, #see, #still, #the, #this, #to, about

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your IP address will be recorded 

  • 1 comment