Skip to content

Commit

Permalink
Localize mid date-time format string
Browse files Browse the repository at this point in the history
This in-game string format is displayed on save/load UI and was not available to localize like the other date formats.
The real-world date time on save/load UI is provided by system DateTime and output depends on user's system locale.
  • Loading branch information
Interkarma committed Aug 22, 2023
1 parent 5694cf2 commit e38246b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3911,6 +3911,10 @@ MonoBehaviour:
m_Key: orcishSkill
m_Metadata:
m_Items: []
- m_Id: 384529964098646016
m_Key: midDateTimeFormatString
m_Metadata:
m_Items: []
m_Metadata:
m_Items: []
m_KeyGenerator:
Expand Down
4 changes: 4 additions & 0 deletions Assets/Localization/StringTables/Internal_Strings_en.asset
Original file line number Diff line number Diff line change
Expand Up @@ -5137,5 +5137,9 @@ MonoBehaviour:
m_Localized: Orcish
m_Metadata:
m_Items: []
- m_Id: 384529964098646016
m_Localized: '{0:00}:{1:00}:{2:00} {3:00} {4:00} 3E{5}'
m_Metadata:
m_Items: []
references:
version: 1
3 changes: 2 additions & 1 deletion Assets/Scripts/Utility/DaggerfallDateTime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,8 @@ public string ShortTimeString()
/// </summary>
public string MidDateTimeString()
{
return string.Format("{0:00}:{1:00}:{2:00} {3:00} {4:00} 3E{5}", Hour, Minute, Second, Day + 1, MonthName, Year);
string midDateTimeFormatString = TextManager.Instance.GetLocalizedText("midDateTimeFormatString");
return string.Format(midDateTimeFormatString, Hour, Minute, Second, Day + 1, MonthName, Year);
}

/// <summary>
Expand Down

0 comments on commit e38246b

Please sign in to comment.