Example_LocalizedString.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. using System;
  2. using UnityEngine;
  3. namespace I2.Loc
  4. {
  5. public class Example_LocalizedString : MonoBehaviour
  6. {
  7. public void Start()
  8. {
  9. Debug.Log(this._MyLocalizedString);
  10. Debug.Log(LocalizationManager.GetTranslation(this._NormalString, true, 0, true, false, null, null));
  11. Debug.Log(LocalizationManager.GetTranslation(this._StringWithTermPopup, true, 0, true, false, null, null));
  12. LocalizedString s = "Term2";
  13. string message = s;
  14. Debug.Log(message);
  15. LocalizedString myLocalizedString = this._MyLocalizedString;
  16. Debug.Log(myLocalizedString);
  17. LocalizedString localizedString = "Term3";
  18. Debug.Log(localizedString);
  19. LocalizedString localizedString2 = "Term3";
  20. localizedString2.mRTL_IgnoreArabicFix = true;
  21. Debug.Log(localizedString2);
  22. LocalizedString localizedString3 = "Term3";
  23. localizedString3.mRTL_ConvertNumbers = true;
  24. localizedString3.mRTL_MaxLineLength = 20;
  25. Debug.Log(localizedString3);
  26. LocalizedString localizedString4 = localizedString3;
  27. Debug.Log(localizedString4);
  28. }
  29. public LocalizedString _MyLocalizedString;
  30. public string _NormalString;
  31. [TermsPopup("")]
  32. public string _StringWithTermPopup;
  33. }
  34. }