Localization stops working after exporting the game

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Keeroh

I was implementing localization with .csv file in my game and everything was working fine inside the editor. But after I exported the game and opened the .exe file the localization won`t work anymore, only showing BTN_NEWGAME instead of NEW GAME for example.

A weird thing that occured too is that the .exe file works without any problems inside the game folder, but when I move to another folder the localization stops working. I also tried looking for errors on the debug log, but I found no errors.

Does anyone have any idea of what is happening? Am I missing something?

Here is the .csv file:
id,en,pt_BR
BTN_NEWGAME,NEW GAME,NOVO JOGO
BTN_LOADGAME,LOAD,CONTINUAR
BTN_EXTRA,EXTRA,EXTRA
BTN_SETTINGS,SETTINGS,CONFIGURACOES
BTN_EXIT,EXIT,SAIR
BTN_STORY,STORY,HISTORIA
BTN_1PLAYER,1 PLAYER,1 JOGADOR
BTN_2PLAYERS,2 PLAYERS,2 JOGADORES
BTN_RETURN,RETURN,VOLTAR
BTN_TIMEATTACK,TIME ATTACK,L. DE TEMPO
BTN_HIGHSCORE,HIGHSCORE,RANKING
BTN_CREDITS,CREDITS,CREDITOS
LAB_RESOLUTION,RESOLUTION,RESOLUÇÃO
LAB_FULLSCREEN,FULLSCREEN,TELA CHEIA
LAB_COLOR,COLOR,COR
BTN_CONFIRM,CONFIRM,CONGIRMA
BTN_OK,OK,OK
LAB_BGM,BGM,BGM
LAB_SFX,SFX,SFX
LAB_KEYBOARDP1P,KEYBOARDP1,TECLADO P1
LAB_UP,UP,CIMA

As far as I know, the CSV-File is converted by Godot to multiple translation.(countrycode).translation files. You should find these in the same folder than the csv file.

My impression is that these translation files didn’t weren’t packaged into the .pck file. Maybe you excluded them by some exclusion filter in the windows export settings? (ressources tab)

wombatstampede | 2020-01-24 12:02

:bust_in_silhouette: Reply From: Keeroh

Yes, the .translation files were generated and I added them on the Localization tab. I too have the impression that they weren’t packaged, but I can’t find the cause. I even tried adding the *.pck files on the resource tab, but it didn’t work

Your .CSV file seems to be wrong written for me. I usually write each language in separate files (e.g. en.csv, pt.csv). Try splitting your language file and load each one in the language tab.

JulioYagami | 2020-01-24 16:08

I tried creating separate files as you suggested but sadly it didn`t work. I will try creating a new project and see if the problem is some configuration inside my game or not. I recompiled godot to use godotSteam, but I don’t think recompiling would cause any problems with localization

Keeroh | 2020-01-25 00:45

Test the official Godot build and check if the problem persists.

JulioYagami | 2020-01-25 11:10

Check if you didn’t selected export all resources in the project in the export settings.

JulioYagami | 2020-01-25 11:42

Hello, sorry for the late reply. Everything is chaotic with the release date of the game so close. I tested again and found this error:

ERROR: FileAccess::get_csv_line: Condition ’ eof_reached() ’ is true. returned: Vector()
At: core\os\file_access.cpp:357
compressing keys: 21
total compressed string size: 175 (175 uncompressed).
bucket table size: 464
hash table size: 92
total collisions: 5
ERROR: FileAccess::get_csv_line: Condition ’ eof_reached() ’ is true. returned: Vector()
At: core\os\file_access.cpp:357
compressing keys: 21
total compressed string size: 157 (157 uncompressed).
bucket table size: 464
hash table size: 92
total collisions: 5
ERROR: RasterizerStorageGLES3::texture_get_data: Condition ’ !texture->active ’ is true. returned: Ref()
At: drivers\gles3\rasterizer_storage_gles3.cpp:835
ERROR: RasterizerStorageGLES3::texture_get_data: Condition ’ !texture->active ’ is true. returned: Ref()
At: drivers\gles3\rasterizer_storage_gles3.cpp:835
ERROR: RasterizerStorageGLES3::texture_get_data: Condition ’ !texture->active ’ is true. returned: Ref()
At: drivers\gles3\rasterizer_storage_gles3.cpp:835
ERROR: RasterizerStorageGLES3::texture_get_data: Condition ’ !texture->active ’ is true. returned: Ref()
At: drivers\gles3\rasterizer_storage_gles3.cpp:835
ERROR: RasterizerStorageGLES3::texture_get_data: Condition ’ !texture->active ’ is true. returned: Ref()
At: drivers\gles3\rasterizer_storage_gles3.cpp:835
ERROR: RasterizerStorageGLES3::texture_get_data: Condition ’ !texture->active ’ is true. returned: Ref()
At: drivers\gles3\rasterizer_storage_gles3.cpp:835

Keeroh | 2020-01-27 17:18