+
    Ki  c                   s<    R t ^ RIt^ RIHt ^ RIHt R tR tR tR# )z"Language and translation utilitiesN)LutrisConfig)loggerc                 sd   \        RR7      p V P                  P                  R4      '       d(    V P                  R,          P                  R4      w  rV# \
        P                  ! 4       w  rV'       g   \        P                  ! R4       R# V#   \         d    T P                  R,          u # i ; i)zHGet locale for the user, based on global options, else try system localeZsystem)ZlevellocaleZ.zUnable to get localeN)	r    Zsystem_configZgetsplitZ
ValueErrorr   Z	getlocaler   Zerror)Zconfiguser_localeZ_user_encoding      5/usr/lib/python3.14/site-packages/lutris/util/i18n.pyget_user_localer   	   s    )F))	2*0*>*>x*H*N*Ns*S'K #)"2"2"4K+,  	2''11	2s   %B B/.B/c                 s<    \        4       p V '       g   R# V R,          # )z4Return the 2 letter language code used by the system :Ni   N)r   )r   s    r   get_langr	      s    !#Kr?    c                 sp    \        4       p V '       g   R# T P                  R\        9   d   RMR4      w  rW3# )z5Return language code and country for the current userZ-Z_)r   r   )r   r   r   )r   Z	lang_codeZcountryr   r   get_lang_and_countryr   "   s6    !#K$**#-3SIIr
   )	Z__doc__r   Zlutris.configr    Zlutris.util.logr   r   r	   r   ) r
   r   <module>r      s     (  & ""r
   