BattlehubCode / RTE_Docs

This is a repository for Runtime Editor documentation, discussion and tracking features and issues.
https://assetstore.unity.com/packages/tools/modeling/runtime-editor-64806
11 stars 0 forks source link

Is it possible to apply localization to pre-existing windows? #36

Closed BattlehubCode closed 2 years ago

BattlehubCode commented 2 years ago

image For example, I'd like the text in the inspector to be in a certain language

BattlehubCode commented 2 years ago

Yes it is possible

  1. find and duplicate resource files (*en-US.xml)

  2. move duplicates to Resources folder image

  3. replace en-US with other locale id image

  4. edit resource files image

  5. use following script to set locale

    
    using Battlehub;
    using Battlehub.RTCommon;
    using Battlehub.RTEditor;
    using UnityEngine;

[DefaultExecutionOrder(-90)] public class SetLocale : EditorExtension { protected override void OnInit() { base.OnInit(); ILocalization localization = IOC.Resolve(); localization.Locale = "uk"; } }