Editing Language Localization
This guide explains how to modify and add translations for GOD - Crosshair Generator.
Localization File Location
The localization file is located at:
god-crosshair/ui/js/settings.jsThe localization data is stored in the Locale object within this file.
Current Supported Languages
The script currently supports the following languages:
English (
en)Turkish (
tr)French (
fr)German (
de)Italian (
it)Spanish (
es)Arabic (
ar)Dutch (
nl)Portuguese (
pt)Danish (
da)Hungarian (
hu)Bulgarian (
bg)Czech (
cs)Finnish (
fi)Brazilian Portuguese (
br)Polish (
pl)Romanian (
ro)Slovak (
sk)Slovenian (
sl)
Language Structure
Each language follows this structure:
Setting Labels
All available setting labels that need translation:
General Settings
generalSettingsTitle- "General" section titletoggleCrosshair- "Toggle Crosshair" labelfiringError- "Firing Error" labelfiringErrorMultiplier- "Firing Error Multiplier" label
Lines Settings
lineSettingsTitle- "Lines" section titletoggleLines- "Show Lines" labellineColor- "Line Color" labellineOpacity- "Line Opacity" labellineLength- "Line Length" labellineThickness- "Line Thickness" labeldistanceBetweenLines- "Distance Between Lines" label
Outlines Settings
outlineSettingsTitle- "Outlines" section titletoggleOutlines- "Show Outlines" labeloutlineColor- "Outline Color" labeloutlineOpacity- "Outline Opacity" labeloutlineThickness- "Outline Thickness" labeloutlineBlur- "Outline Blur" label
Center Dot Settings
centerDotSettingsTitle- "Center Dot" section titletoggleCenterDot- "Show Center Dot" labelcenterDotColor- "Center Dot Color" labelcenterDotRoundness- "Center Dot Roundness" labelcenterDotOpacity- "Center Dot Opacity" labelcenterDotThickness- "Center Dot Thickness" labeltoggleShotgun- "Shotgun Crosshair" label
Adding a New Language
Step 1: Add Language Entry
Add your new language to the Locale object in settings.js:
Step 2: Set Default Language (Optional)
To set your new language as the default, change:
Example: Adding Russian
Editing Existing Translations
To edit an existing translation:
Open
god-crosshair/ui/js/settings.jsFind the language you want to edit (e.g.,
["en"])Modify the translation strings
Save the file
Restart the resource:
restart god-crosshair
Example: Changing English Translation
Language Codes
Use standard ISO 639-1 language codes:
en- Englishtr- Turkishfr- Frenchde- Germanit- Italianes- Spanishar- Arabicnl- Dutchpt- Portugueseru- Russianja- Japanesezh- Chineseetc.
Dynamic Language Switching
Currently, the language is set statically in the Locale.Lang variable. To implement dynamic language switching per player, you would need to modify the client-side code to:
Store player language preference
Send language preference from server to client
Update
Locale.Langbased on player preference
Testing Translations
After adding or modifying translations:
Save the
settings.jsfileRestart the resource:
restart god-crosshairJoin the server and open the crosshair menu (
/crosshair)Verify all text appears correctly in your language
Common Issues
Translation Not Appearing
Check that the language code matches exactly
Verify all required labels are translated
Ensure the file was saved correctly
Restart the resource after changes
Missing Labels
If a label is missing, the UI will show the label key instead. Make sure all labels in the settingLabels object are translated.
Special Characters
Some languages use special characters. Make sure your file encoding is UTF-8 to display them correctly:
Arabic:
العربيةChinese:
中文Russian:
Русский
Best Practices
Complete Translations: Always translate all labels, even if some seem obvious
Consistent Terminology: Use consistent terms throughout (e.g., always use "Crosshair" not "Reticle")
Context: Consider the context when translating (e.g., "Toggle" might need different translations in different contexts)
Test: Always test translations in-game to ensure they fit the UI properly
Backup: Keep a backup of the original file before making changes
File Structure Reference
The relevant section in settings.js:
Last updated