So you want to translate the site into another language. This thread exists to provide a guide for how language packs are created and accepted.
Step #1: Where to Start
The first thing you will need is a copy of the English language pack. This provides English sentences for any text that is templated. All that means is, this is our base pack and if a piece of text is translatable then an entry should appear here.
You can find a copy of the language pack on our frontend repository on Git Gud.
Here is a direct link:
https://gitgud.io/8chan/Aleph/-/blob/dev-localization/languages/eng.json
The branch
dev-localization
should always have the latest changes, and is usually a few edits ahead of the actual site while we're between updates. That link takes you to that version of the file.
If you're familiar with git, you can clone the repo. If not, check out the "Download" button to the right of "Open Web IDE". You can get a copy of
just the English language pack.
Step #2: Editing
You will need a text editor to edit these files. There are many out there, including Vim, Atom, VSCode, and Notepad for you masochists.
The language packs are in JSON format. If you're not familiar with it, that's perfectly fine. All you need to know is that entries are formatted as such:
"name" : "value",
We want to leave the names alone (this is how LynxChan knows where to template it in) and edit the value segment. Translate these words or sentences into your native language. Feel free to use any special unicode characters that are common in this language; the website should have little trouble rendering them.
If you cannot translate everything, that's fine. There are a lot of lines and it takes time. You can leave some sentences in English so that they will still appear on the site. If you remove the line entirely, it will just display placeholder text. When you're ready to make a submission, you can move on.
Step #3: Submitting
First, you will need to name the file appropriately. If you view the existing language packs, you will see they are named things like eng,json, spa.json, and ita.json for English, Spanish, and Italian respectively. These are not arbitrary filenames. They come the ISO 639-2 specification. You can find a full list here:
https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
I should mention I'm not actually sure if LynxChan relies on the B or T designation, but for the majority of languages it doesn't make a difference. On the off chance you happen to be translating for one of the few where it does, let me know and I can see if LynxChan only accepts one or the other.
Find your language's designation and name it based on that.
Finally you're ready to send the data in. Again, there are two methods depending on whether you know git or not.
If you do know git, fork the repo and push your changes somewhere on Git Gud. Then open a Pull Request to the dev-localization branch. I will review and accept the request.
If you don't know git and that sounds like a lot of nonsense to you, then you can just upload the file in this thread and I will include it in the next site update.
That's it!
It's a lot of tedious work, but it's not that hard assuming you actually speak the language. If you speak something other than English, I would encourage you to make a submission so we can grow out library of translations.
Even if a language pack already exists, it may be out of data. In that case, you will have less work to do, but your contribution is still incredibly valuable.