php / doc-base

Tools for the PHP documentation
Other
347 stars 88 forks source link

Translate Docs into Hindi Language #177

Open codingwithrk opened 1 week ago

codingwithrk commented 1 week ago

Hi, I would like to translate PHP Official Docs into Hindi language. The whole INDIA's primary language is Hindi.

saundefined commented 1 week ago

Hi @codingwithrk!

Thanks for your interest in contributing to the PHP documentation.

You can create a new translation repository in your own account, and then start with the translation, trying to get other contributors interested in this to help (you have a tremendous amount of work to do).

When you get to the point where at least the most relevant pages have been translated, write to the mailing list phpdoc@lists.php.net (or ping here).

Then the repository can be moved to PHP organization, and integrated to the PHP manual.

alfsb commented 1 week ago

Hi @codingwithrk . I will try to give specific instructions for starting a new manual language. This is not an official instruction, but may be a base for future documentation. So please comment on any difficulties or if any step was hard to follow or understand.

  1. First, read the entire PHP Manual Contribution Guide at https://doc.php.net/guide/ .

It is a bit long, but the manual itself is way longer. This Guide explains conditions needed to have a building translation, and it is necessary for any future integration (see below).

  1. Create a git repository for the new translation. This repository can be hosted in GitHub or elsewhere, under your control.

  2. On this repository, create an translation.xml file, following the skeleton example at https://raw.githubusercontent.com/php/doc-base/refs/heads/master/translation.xml.dist .  You can use this issue to announce the new repository, and maybe get some fellow translators.

(The file above is missing as of now, you can use a small translation.xml as base. For example doc-uk has a small file, that may be easier to understand and edit).

  1. After the repository is set up, you start by copying and translating some files starting from doc-en. This is easier to do from an local file system, that will be necessary for build tests latter, so let's create a basic structure now. In your machine:

    mkdir phpdoc
    cd phpdoc
    git clone https://github.com/php/doc-base.git doc-base
    git clone https://github.com/php/doc-en.git   en
    git clone https://github.com/{YOUR_USER}/doc-{LANG}.git {LANG}
  2. The minimal requisite for integrating and publishing a new manual is having all files from these directories of doc-base (local en/) copied and translated: chapters/, features/, language/ and security/.

  3. It's also a requisite that manual builds without erros, so you need to run this from time to time, preferably before any commit push:

php doc-base/configure.php --with-lang=$LANG

And that's it, for now. After the manual has the minimal parts translated, and it's also building, you can ask for it integration and publication on PHP website.

alfsb commented 1 week ago

The text above can be used to create an Starting a new translation, to be added after Joining the team on Contribution Guide. I may create PRs to this effect, and also an translation.xml.dist example, in the following weeks.

If anyone are interested in doing this, please send a small comment. My recommendations is to inspect each translation.xml to create an "complete" exemple (there are various good examples spread there) and to modify the text above based of feedbacks on this issue.

alfsb commented 6 days ago

Please ping me on WhatsApp My website. Here, you can find my number.

Sorry, I would not talk over WhatsApp. Please, send any question here, as they also be included in a future documentation for nascent translations. I will try to hangout on #php-doc in the following days. There are other php doc people there, that may also help.

alfsb commented 4 days ago

I will try to hangout on #php-doc in the following days. There are other php doc people there, that may also help.

Forgot to add, this #php-doc specifically: https://discord.com/channels/356354025865740288/970787522718355456