Download

Arabic version of Unreal Editor

Arabic version of Unreal Editor

Introduction

I am trying to create an Arabic version of Unreal Editor like Japanese, Korean, and Chinese. If you are interested or want to get in details of the work, then join!

What is Arabic script

The Arabic script is written from right to left in a cursive style (so it’s complicated) letters change depending on their context (initial, medial, final, isolated).

Arabic script in Unicode

In Unicode the characters of the Arabic script are contained in four blocks:

  • Arabic (0600–06FF)
  • Arabic Supplement (0750–077F)
  • Arabic Presentation Forms-A (FB50–FDFF)
  • Arabic Presentation Forms-B (FE70–FEFF)

Unreal Engine 4 supports UTF-8 which is good.

What I have done so far?

I started prototyping Slate UI which is off-the-shelf UI solution, and rendered some Arabic text in help menu as an example.

Number substitution bug

I actually found that if your OS language is set to Arabic you will get empty square glyph instead of numbers.

Ok. Here’s a few steps to get you started on translating the editor into a language we don’t currently support.

If you go to your editor settings you can change your language to be Arabic specific. You’ll find it under the Appearance section in your build, I believe.

Next you need to go to UE4\Engine\Config\Localization and open up the Editor.ini and Engine.ini. In there you’ll find a CulturesToGenerate array, you should add Arabic to both of these.You should consider removing the other language so as to not corrupt your content and iterate faster.

Next you should run the editor with the following cmdline:

-run=GatherText -config="…/…/…/Engine/Config/Localization/Engine.ini"

and then

-run=GatherText -config="…/…/…/Engine/Config/Localization/Editor.ini"

This will create the Arabic archive files. You’ll find them under UE4\Engine\Content\Localization. You can then enter translations into your archive files and re-run the above cmdlines. They will create/update your locres.

Your editor will automatically load the Arabic locres if your editor language is set to Arabic.

Be aware that there is a bug in the Language/Region settings that makes the setting only apply to the currently open project. So the splash screen won’t appear in Arabic since that appears before the project is loaded. You can get around this by changing your OS language/region to Arabic.

This should get you well on your way.

Unfortunately, we don’t have much support for your current goal. Good luck! Let me know how it goes!

Ok, Thanks Sarge.

In order to get the engine to properly fallback to an Arabic supported TTF you’ll need to translate (“Slate”, “FallbackFont”) in the archive. The translation should be the name of a TTF font under Engine/Content/Slate/Fonts.

For example, the default translation for this is “DroidSansFallback”, but the Korean archives translate it to “NanumGothic”.

I realize this is pretty terrible solution. In the near future we’ll be implementing something similar to composite fonts which will better resolve problems like this.

I added CulturesToGenerate=ar

then I have Arabic in Appearance section selected automatically with Arabian countries only in the region!

What to do next?

Are you sure I don’t need to add anything to ResourceFileGen.ini? GenerateGlobalizationFiles.bat useful? How do I gather text from source code? What the initial size of an empty archive?

Sorry for so much questions…

You don’t need to add anything to the ResourceFileGen.ini unless you want to just build loc resource files. The current Engine/Editor .ini handle all phases of the text gathering, updating manifest/archives and the locres generating for you already. If you crack them open you’ll see [GatherTextStep0], [GatherTextStep1], etc… above each step is a comment about what it is doing.

I’m not sure what you mean regarding the initial size of an empty archive and why that would be important information, but running the Engine/Editor .ini through the commandlet I specified will update/create your archives. They should be pre-populated with blank translation entries.

Sorry the system is not well documented yet and is largely managed through cmdlets. In the future we hope to integrate this through the editor so things are much easier to work with, though the cmdlets will still be necessary in the future for automation.

Should I use UE4Editor.exe or UE4Editor-cmd.exe ? Should I use cmd.exe or PowerShell?

I got a lot of error and warnings generated this archive for the editor:

{
“Namespace”: “”
}

Unfortunately, it did not work as expected I have “ar” folder in both “Engine” and “Editor” but they are not filled with blank translations.

I used these commands:

C:\Users\Faisal\UnrealEngine\Engine\Binaries\Win64\UE4Editor.exe -run=GatherText -config="…/…/…/Engine/Config/Localization/Engine.ini"

C:\Users\Faisal\UnrealEngine\Engine\Binaries\Win64\UE4Editor.exe -run=GatherText -config="…/…/…/Engine/Config/Localization/Editor.ini"

I get a small archive for the engine and empty archive for the editor. Can you try from your computer?

Ok, so I ran the exact same cmdline and things worked perfectly for me. :confused: So I have a few questions.

Are your manifest files empty after generation?

Are your manifest files marked as read-only? Actually make sure none of the archives, manifests, and locres are read-only.

Can you attach/send your log?

My manifest files empty after generation it’s 1 KB for the editor and 53 KB for the engine it looks broken…

Where is the log? I can see red line in cmd.exe but it closes I can’t take a picture

Ok, I’m going to need your log output to debug further.

Where can I get it?

Copy it from your Output log in Visual Studio.

[2014.03.25-18.28.29:710] 0]LogAutomationTest:Warning: Loading localization resources contain conflicting entries for (Namespace:UICommands, Key:ToggleRealtime_ToolTip):
Resource: (C:/Users/Faisal/UnrealEngine/Engine/Content/Localization/Editor/en/Editor.locres) Hash: (-291638278) String: (Toggle Realtime)
Resource: (C:/Users/Faisal/UnrealEngine/Engine/Content/Localization/Editor/en/Editor.locres) Hash: (-1913389001) String: (Toggles real time rendering in this viewport)
[2014.03.25-18.28.29:711] 0]LogAutomationTest:Warning: Loading localization resources contain conflicting entries for (Namespace:UICommands, Key:ToggleRealtime_ToolTip):
Resource: (C:/Users/Faisal/UnrealEngine/Engine/Content/Localization/Editor/en/Editor.locres) Hash: (-291638278) String: (Toggle Realtime)
Resource: (C:/Users/Faisal/UnrealEngine/Engine/Content/Localization/Editor/en/Editor.locres) Hash: (-1913389001) String: (Toggles real time rendering in this viewport)
[2014.03.25-18.28.29:711] 0]LogAutomationTest:Warning: Loading localization resources contain conflicting entries for (Namespace:UICommands, Key:ToggleRealtime_ToolTip):
Resource: (C:/Users/Faisal/UnrealEngine/Engine/Content/Localization/Editor/en/Editor.locres) Hash: (-291638278) String: (Toggle Realtime)
Resource: (C:/Users/Faisal/UnrealEngine/Engine/Content/Localization/Editor/en/Editor.locres) Hash: (-1913389001) String: (Toggles real time rendering in this viewport)
[2014.03.25-18.28.29:712] 0]LogEngine: Initializing Engine…
‘UE4Editor.exe’ (Win32): Loaded ‘C:\Windows\System32\XAudio2_7.dll’. Cannot find or open the PDB file.
‘UE4Editor.exe’ (Win32): Loaded ‘C:\Windows\System32\MMDevAPI.dll’. Cannot find or open the PDB file.
[2014.03.25-18.28.29:838] 0]LogInit: XAudio2 using ‘Speakers / HP (IDT High Definition Audio CODEC)’ : 2 channels at 48 kHz using 16 bits per sample (channel mask 0x3)
‘UE4Editor.exe’ (Win32): Loaded ‘C:\Windows\System32\AudioSes.dll’. Cannot find or open the PDB file.
[2014.03.25-18.28.29:861] 0]LogInit: FAudioDevice initialized.
[2014.03.25-18.28.29:886] 0]LogDerivedDataCache: Saved boot cache 0.02s 37MB …/…/…/…/Documents/Unreal Projects/ContentExamples/DerivedDataCache/Boot.ddc.
[2014.03.25-18.28.29:892] 0]LogInit: Texture streaming: Enabled
‘UE4Editor.exe’ (Win32): Loaded ‘C:\Users\Faisal\UnrealEngine\Engine\Binaries\Win64\UE4Editor-DesktopPlatform.dll’. Symbols loaded.
‘UE4Editor.exe’ (Win32): Loaded ‘C:\Windows\System32\comdlg32.dll’. Cannot find or open the PDB file.

Couldn’t add it all

The full debug output http://pastebin.com/NxLNdmc7

I think you gave me the wrong log. I mean the log from running the commandlet. This appears to be a log for running the editor.

I can’t copy from the cmd.exe what is the correct way to execute commandlet?

Try tacking > enginelog.txt to the end of your cmd. This will dump the output to a file called enginelog.txt next to the exe.

-run=GatherText -config="…/…/…/Engine/Config/Localization/Engine.ini" > enginelog.txt

-run=GatherText -config="…/…/…/Engine/Config/Localization/Editor.ini" > editorlog.txt

editor log http://pastebin.com/63sSCkNy

engine log http://pastebin.com/Z6Jsc1dD