feat:Add python API GetKicadCurrentLanguage

This commit is contained in:
Zhuang Jiezhi 2023-11-12 22:52:54 +00:00 committed by Seth Hillbrand
parent e72f563033
commit 9b8fa85b32
2 changed files with 15 additions and 0 deletions

View File

@ -605,3 +605,11 @@ bool WriteDRCReport( BOARD* aBoard, const wxString& aFileName, EDA_UNITS aUnits,
return true;
}
wxString GetLanguage()
{
if( s_PcbEditFrame )
return GetSettingsManager()->GetCommonSettings()->m_System.language;
else
return "";
}

View File

@ -209,4 +209,11 @@ bool IsActionRunning();
bool WriteDRCReport( BOARD* aBoard, const wxString& aFileName, EDA_UNITS aUnits,
bool aReportAllTrackErrors );
/**
* Get the language string from COMMON_SETTINGS.
*
* @return the current language string.
*/
wxString GetLanguage();
#endif // __PCBNEW_SCRIPTING_HELPERS_H