Simple guide how to translate (localize) of Cotonti plugin files hosted with GitHub.
This guide describes how to localize language files for Cotonti plugins hosted on GitHub. It’s easy as 1-2-3. Just follow these steps:
Let’s assume we want to translate social_share
plugin by Macik.
-
First of all, sign in GitHub (you should be registered) and locate
social_share
. -
Goto repository of source plugin, locate there
lang
folder (path will becot-pluginname/plugins/plugin_name/lang/
or similar). -
Find English version of language file (with
en
mark in file name), or other country language file you can translate to your language. Open it with «Raw» button on the panel. (direct link) -
You can see «raw» source text of file - just copy it to clipboard (in Windows you can press
Ctrl-A
to select all text, andCtrl-C
to copy it). -
Go back to
lang
folder (with direct link or by pressing←prev.page
button in your browser panel). Press «+» sign button to fork repository and create new file. (direct link) -
Name it as
plugin_name.##.lang.php
, whereplugin_name
is name of plugin, and##
is 2-letter code for you language (see this file if you doubt). -
Paste english text from clipboard and start translating it. As you done press «Propose New File» button. Name your commit as (for example)
Translation in Brazil
and press «Send pull request» . Thats all! -
Now you can browse commit to download translation file - click
Files changed
→View file @ …
button → right-click onRaw
button to download source(clickSave As…
). Place this file inlang
folder of plugin on your site for use.
Now, as author of plugin merged you translation commit it will be automatically included in original plugin downloads for all users. Respect.