From 3b563c1f64050afb929ab60cde88377ae6fd29e2 Mon Sep 17 00:00:00 2001 From: glixx Date: Wed, 22 May 2019 06:12:28 +0300 Subject: [PATCH] examples: Games: RobotFindsKitten: reading localized nkis.txt if exists --- app/examples/Games/RobotFindsKitten/.src/Frfk.class | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/examples/Games/RobotFindsKitten/.src/Frfk.class b/app/examples/Games/RobotFindsKitten/.src/Frfk.class index a76aaf467..fb90f90e1 100644 --- a/app/examples/Games/RobotFindsKitten/.src/Frfk.class +++ b/app/examples/Games/RobotFindsKitten/.src/Frfk.class @@ -94,12 +94,18 @@ Public Sub Form_Open() Dim nkitext As String[] NKIs = New Object[] nkitext = New String[] + Dim sLanguage As String Randomize origheight = Me.height origwidth = Me.width origfontsize = 12 - Try nkistring = File.load("nkis.txt") + sLanguage = Left$(System.Language, 2) + Try nkistring = File.load("nkis_" & sLanguage & ".txt") + If Error Then + Try nkistring = File.load("nkis.txt") + Endif + nkitext = Split(nkistring, "\n") KittenisFound = False numnkis = 20