Difference between revisions of "Localization Guide"

From AwesomeWiki
(Getting set up)
(Getting set up)
Line 4: Line 4:
 
# Download this file: https://raw.github.com/awesomefoundation/awesomebits/master/config/locales/en.yml (go to File -> Save Page As in your browser after clicking on the link)
 
# Download this file: https://raw.github.com/awesomefoundation/awesomebits/master/config/locales/en.yml (go to File -> Save Page As in your browser after clicking on the link)
 
# Open the file in a plain text editor
 
# Open the file in a plain text editor
#* Mac: You can use TextEdit, but make sure it is not in rich text mode using Format -> Make Rich Text. If you can bold or italicize something in the editor, you're in the wrong mode.
+
#* Mac: You can use TextEdit, but make sure it is not in rich text mode. If you can bold or italicize something in the editor, you're in the wrong mode, go to ''Format -> Make Plain Text'' to make sure you're in the right mode.
 
#* Windows: You can use Notepad.
 
#* Windows: You can use Notepad.
 
# Save the file as xx.yml, where xx is the [http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes two-letter language code] for the language you are translating.
 
# Save the file as xx.yml, where xx is the [http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes two-letter language code] for the language you are translating.
Line 11: Line 11:
 
# Change these files names to *.xx.md (where xx is again the 2 letter code for your language)
 
# Change these files names to *.xx.md (where xx is again the 2 letter code for your language)
  
You are now ready to enter the translations into this new YAML file!
+
You are now ready to enter the translations into your new YAML and Markdown files!
  
 
===The Basics===
 
===The Basics===

Revision as of 07:57, 4 February 2015

We want the Awesome Foundation website to be in as many languages as possible! If you're interested in helping us translate the site to a new language, just follow this guide...

Getting set up

  1. Download this file: https://raw.github.com/awesomefoundation/awesomebits/master/config/locales/en.yml (go to File -> Save Page As in your browser after clicking on the link)
  2. Open the file in a plain text editor
    • Mac: You can use TextEdit, but make sure it is not in rich text mode. If you can bold or italicize something in the editor, you're in the wrong mode, go to Format -> Make Plain Text to make sure you're in the right mode.
    • Windows: You can use Notepad.
  3. Save the file as xx.yml, where xx is the two-letter language code for the language you are translating.
  4. On the first line of the file, change "en:" to "xx:"
  5. Also download all of the raw versions of the *.en.md files in the directory: https://github.com/awesomefoundation/awesomebits/tree/master/app/views/locales (these are larger blocks of text for pages like the About page and FAQ)
  6. Change these files names to *.xx.md (where xx is again the 2 letter code for your language)

You are now ready to enter the translations into your new YAML and Markdown files!

The Basics

The file is a YAML file that will tell the website how to swap out the English-centric copy for other localizations. It's mostly about direct translation of every word on the page (the copy, the comments, the navigation, and even the metadata), but it can actually go beyond that to culturally-correct numbering & dates as well!

Simple Example

All you really need to do is go down the file, swapping out each phrase for the proper one in your language. For example, if you were doing French, you could change: Template:Thanks: "Thanks for applying!" to Template:Thanks: "Merci d'application!"

Quotation Marks

You may notice that some of the phrases have quotations marks around them while others do not. By default, quotation marks are not necessary. However, if your phrase has some funky symbols in it (like : or ! or < or >), you should put quotation marks around it so that it doesn't interfere with the code.

Wrapping Up

First, use this YAML checker to make sure that your code works.