Code Vein Builder

Fork Me

Submit a Translation

Would you like to submit a translation to Code Vein Builder and help extend the available languages? If so, please read the information provided below to learn how to submit your translation!

Note: A Github account is required to submit translations via pull request. If you don't have one you can register an account here. Please make sure you're signed into your account while following the steps below.


Quick Navigation

Getting Started: Fork and Clone Code Vein Builder

To get started, you first need to fork Code Vein Builder. To do this, simply go to the repository on github and click the "Fork" button. This should fork your own version of the repository, allowing you to make changes.

fork

Once forked you can optionally clone your version of the repository to your local system. Personally, I recommend using Github Desktop, because it makes managing clones and pushing changes to them super easy. If you don't feel like cloning, you can use the web version of Github to make your changes.

Creating Your Language Folder and Files

Once you've got everything setup in the previous step, it's time to make a new folder. Go to the following folder: resources > lang and either create a new folder or duplicate the English folder "en" as it should be the latest translation. Now that your folder is created, it's time to give it a name, preferablly an ISO Language Code. If you're not sure about the ISO Code, just put the name of your language for now and we'll make the change for you later.

adding folder

Now that your folder is created it's time to add the files. (if you duplicated the folder, just ignore this part) Go to the English translation folder (lang > en) and copy all of the files to your new language folder. Your folder should look like the following image once completed.

adding files

Translating

While translating I recommend booting up Code Vein and copying the texts from the game for skills, weapons, etc. as it should be a quicker process. There should only be one file to translate; lang.js. You'll want to focus on translating the non-minified file; the file without .min. Open this file in the text editor or IDE of your choice. If you don't have any, I recommend getting and using Notepad++ as it's a quick and solid text editor for code.

lang.js is the general language file; it contains strings for the entire application. When translating, make sure to only edit the content encased in single or double quotes (green text in the image below), as these are strings. The content to the left of the string (blue below) is simply an "alias" used for getting and setting the string.

editing strings

One last thing, if you happen to use a single quote in a single quote encased string and the same with double quotes, you need to escape it with the special escape character "\." (example : 'Player\'s Build')

Testing Your Translation (Optional)

If you're editing online on Github and not on your local file system, you may skip this step.

Testing your translation is fairly simple and straightforward. Open index.html in the browser of your choice, then in the URL bar add ?devmode=true&lang=en to the end of the URL, replace en with the name of your language folder, and lastly hit the ENTER key (or GO) to apply these parameters. Your URL should look something like the example below.

copied index file

If done correctly, you should be able to test your translation out! If it's not working be sure to open your browser's developer tools (usually F12 OR right click > inspect) and check the Console tab for any errors. Click the file link on the far right to jump to where the error occurs, so you can try and fix it. If you're unable to fix the errors, don't worry about it, we'll fix them for you when you make a pull request.

Submitting Your Translation

After translating everything, it's time for the final step; submitting! To submit your translation, you first need to push all your changes to your fork of Code Vein Builder. If you've been editing locally in your cloned repository, all you should need to do is open Github Desktop, commit your changes, and then push them. If editing online, your changes should already be committed and pushed.

So, the final-final step is submitting a Pull Request! To submit one, click here, then click "compare across forks", for the "head repository" choose your fork, and last but not least click "Create pull request" to submit your translation!

pull request

Once submitted, all you need to do is wait to hear back from us, which should take around 24 hours. If there's no issues, your translation will be added that day!

Lastly, I'd like to thank you for taking the time to help translate Code Vein Builder and make it available to more people. Your help is greatly appreciated!