From 67747196b767b084ab5b8521ae15d6ddd585c233 Mon Sep 17 00:00:00 2001 From: Anthony Wilcox <35226681+tomiscw@users.noreply.github.com> Date: Tue, 1 Jan 2019 08:27:45 -0500 Subject: [PATCH] Localization in English and Swedish - New localization for English (obviously) and now Swedish. The system is very straight forward, but I'd suggest checking out Godot's documentation for a proper understanding on how it works. https://docs.godotengine.org/en/3.0/getting_started/workflow/assets/importing_translations.html --- Interface.tscn | 8 ++++---- MainScreen.tscn | 2 +- lang/local.csv | 5 +++++ lang/local.csv.import | 16 ++++++++++++++++ lang/local.en.translation | Bin 0 -> 492 bytes lang/local.sv.translation | Bin 0 -> 496 bytes project.godot | 5 +++++ windows/About.tscn | 4 ++-- windows/ComingSoon.tscn | 4 ++-- windows/Credits.tscn | 2 +- 10 files changed, 36 insertions(+), 10 deletions(-) create mode 100644 lang/local.csv create mode 100644 lang/local.csv.import create mode 100644 lang/local.en.translation create mode 100644 lang/local.sv.translation diff --git a/Interface.tscn b/Interface.tscn index 8119808..9d3c0bf 100644 --- a/Interface.tscn +++ b/Interface.tscn @@ -78,9 +78,9 @@ pressed = true enabled_focus_mode = 2 shortcut = null group = null -text = "Music" +text = "KMUS" flat = false -align = 0 +align = 1 _sections_unfolded = [ "custom_colors" ] [node name="CreditsBtn" type="Button" parent="ReferenceRect/VertContainer" index="1"] @@ -103,7 +103,7 @@ toggle_mode = false enabled_focus_mode = 2 shortcut = null group = null -text = "Credits" +text = "KCRE" flat = false align = 1 @@ -127,7 +127,7 @@ toggle_mode = false enabled_focus_mode = 2 shortcut = null group = null -text = "About" +text = "KABO" flat = false align = 1 _sections_unfolded = [ "Margin" ] diff --git a/MainScreen.tscn b/MainScreen.tscn index 7a55a1b..43fe4d4 100644 --- a/MainScreen.tscn +++ b/MainScreen.tscn @@ -6,7 +6,7 @@ [ext_resource path="res://Clothes.tscn" type="PackedScene" id=4] [ext_resource path="res://Interface.tscn" type="PackedScene" id=5] -[node name="MainScreen" type="Node2D" index="0"] +[node name="MainScreen" type="Node2D"] [node name="Background" type="Sprite" parent="." index="0"] diff --git a/lang/local.csv b/lang/local.csv new file mode 100644 index 0000000..4c2d134 --- /dev/null +++ b/lang/local.csv @@ -0,0 +1,5 @@ +,en,sv +KMUS,Music,Musik +KCRE,Credits,Eftertexter +KABO,About,Handla om +KSOO,Coming Soon,Kommer snart \ No newline at end of file diff --git a/lang/local.csv.import b/lang/local.csv.import new file mode 100644 index 0000000..beece0d --- /dev/null +++ b/lang/local.csv.import @@ -0,0 +1,16 @@ +[remap] + +importer="csv_translation" +type="Translation" + +[deps] + +files=[ "res://lang/local.en.translation", "res://lang/local.sv.translation" ] + +source_file="res://lang/local.csv" +dest_files=[ "res://lang/local.en.translation", "res://lang/local.sv.translation" ] + +[params] + +compress=true +delimiter=0 diff --git a/lang/local.en.translation b/lang/local.en.translation new file mode 100644 index 0000000000000000000000000000000000000000..d9dc37ec679c21ff9bf0e61ce339168e812a1db9 GIT binary patch literal 492 zcmbV}Jxc>Y5QfLE#E&QlDYQzku?)5%h@24{K`!>k-eyP^FMG1HSNbdb6E^-a%e2Dj zJLd&bSUK?U&b+&`yK|RL(uCUBTGM0XkM~CAPr-O8OmwAR?fbXxqVogX%EhVMa+zax+t0srURsNye^9-FPIKd=9PWs*cy71#Nhnww@qwt zFA*lu2G|G9NtdJ11@+WI{5kUu7B<0|?m*~AQcsmVZ9|4Yt#1URQO!H8KZN#yUZdPz zf4xIU*A+cV{qgdAsY5FL#g6QdwnSSSV?8ztC^V4(+rAj)ZfY}O@Nve}cHJ-hq>YyX6eeSVW= zN`=!m=LJ$&Iq-P1Z|8G2zK^e{vf2V~!@uh)9zJBsvs1yQejfL4UPtC0kQq+%Oq;}| zTDc^o32WmGZ7tq;H8#|MGB(U=V3_JSlo^IL;0`fe5>($A+QhM+>yZhSAe}g5)(?Ku zSZDSrKqOiMnm}3Uywf?OmPoKacV5NCGH@gjFnJ`=g!!3PKy5&zZy2a#@z*N74c-N$ zjo|w7>kULQq)Z~EM2}|2kD|$PveCr{*&VPvLJN4O*<>Fqb>}#QFQXOR`pdy-K}GM? Z^_q>_8r