klavaro  3.13
About: Klavaro is a touch typing tutor program.
  Fossies Dox: klavaro-3.13.tar.bz2  ("unofficial" and yet experimental doxygen-generated source code documentation)  

translation.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  Lang_Name_Code
 

Macros

#define LANG_SET
 
#define LANG_NAME_MAX_LEN   60
 
#define KBD_NAME_MAX_LEN   20
 

Functions

void trans_init_lang_name_code (void)
 
const gchar * trans_code_to_country (gchar *code)
 
gchar * trans_get_default_keyboard (void)
 
gchar * trans_get_code (gint i)
 
gboolean trans_lang_is_available (gchar *test)
 
gboolean trans_lang_has_stopmark (void)
 
gboolean trans_is_tibetan (void)
 
FILE * trans_lang_get_similar_file (const gchar *file_end)
 
gchar * trans_lang_get_similar_file_name (const gchar *file_end)
 
void trans_init_language_env (void)
 
void trans_set_combo_language (void)
 
gchar * trans_get_current_language (void)
 
void trans_change_language (gchar *language)
 
gchar * trans_read_text (const gchar *)
 

Macro Definition Documentation

◆ KBD_NAME_MAX_LEN

#define KBD_NAME_MAX_LEN   20

Definition at line 74 of file translation.h.

◆ LANG_NAME_MAX_LEN

#define LANG_NAME_MAX_LEN   60

Definition at line 73 of file translation.h.

◆ LANG_SET

#define LANG_SET

Definition at line 30 of file translation.h.

Function Documentation

◆ trans_change_language()

void trans_change_language ( gchar *  language)

Update the current language used accordingly to that selected in the 'combo_language'

Definition at line 498 of file translation.c.

References _, fluid_reset_paragraph(), get_wg(), i, lang, lang_num, language, main_preferences_set_string(), name, and velo_reset_dict().

Referenced by on_combobox_language_changed(), and on_combobox_top10_language_changed().

◆ trans_code_to_country()

const gchar* trans_code_to_country ( gchar *  code)

Get country name from its "ISO code" (eo and xx are just languages...)

Definition at line 46 of file translation.c.

References COUNTRY_N, and i.

Referenced by keyb_get_country().

◆ trans_get_code()

gchar* trans_get_code ( gint  i)

Definition at line 218 of file translation.c.

References i, lang, and lang_num.

Referenced by top10_get_score_file().

◆ trans_get_current_language()

gchar* trans_get_current_language ( void  )

Get the current language name, mapped from the preference's key code

Definition at line 471 of file translation.c.

References i, lang, lang_num, main_preferences_get_string(), and name.

Referenced by on_combobox_stat_module_changed(), plot_draw_chart(), and tutor_calc_stats().

◆ trans_get_default_keyboard()

gchar* trans_get_default_keyboard ( void  )

Get a 'reazonable' value for keyboard, that is, QWERTY... :-(

Definition at line 120 of file translation.c.

References i, lang, lang_num, and main_preferences_get_string().

Referenced by keyb_set_chars(), and keyb_set_combo_kbd().

◆ trans_init_lang_name_code()

void trans_init_lang_name_code ( void  )

Initialize 'lang', 'code' and 'kbd' accordingly to 'language_set', which was defined in "languages.h".

Definition at line 148 of file translation.c.

References Lang_Name_Code::cd, Lang_Name_Code::code, i, Lang_Name_Code::kbd, lang, lang_num, LANG_SET, and Lang_Name_Code::name.

Referenced by main_initialize_global_variables().

◆ trans_init_language_env()

void trans_init_language_env ( void  )

◆ trans_is_tibetan()

gboolean trans_is_tibetan ( void  )

◆ trans_lang_get_similar_file()

FILE* trans_lang_get_similar_file ( const gchar *  file_end)

Find a file whose language prefix is similar to the current one

Definition at line 537 of file translation.c.

References i, lang, lang_num, main_path_data(), and main_preferences_get_string().

Referenced by fluid_init_paragraph_list(), and trans_read_text().

◆ trans_lang_get_similar_file_name()

gchar* trans_lang_get_similar_file_name ( const gchar *  file_end)

Find a file whose language prefix is similar to the current one, returnig its name

Definition at line 570 of file translation.c.

References i, lang, lang_num, main_path_data(), and main_preferences_get_string().

Referenced by tutor_char_distribution_approved(), and velo_init_dict().

◆ trans_lang_has_stopmark()

gboolean trans_lang_has_stopmark ( void  )

Define if we may put a stop mark at the end of "phrases".

Definition at line 240 of file translation.c.

References main_preferences_get_string().

Referenced by adapt_create_word(), adapt_draw_random_pattern(), and velo_draw_random_words().

◆ trans_lang_is_available()

gboolean trans_lang_is_available ( gchar *  test)

Definition at line 226 of file translation.c.

References i, lang, and lang_num.

Referenced by trans_init_language_env().

◆ trans_read_text()

gchar* trans_read_text ( const gchar *  file_end)

Reads the text of a file to be presented at some dialog, accordingly to the environment language. 'text': new buffer where the text is copied into. 'file_end': how the file name ends

Definition at line 604 of file translation.c.

References _, main_path_data(), main_path_user(), main_preferences_get_string(), main_preferences_set_string(), pos, and trans_lang_get_similar_file().

Referenced by tutor_update_intro().

◆ trans_set_combo_language()

void trans_set_combo_language ( void  )

Inserts the list of available languages in the 'combo_language'.

Definition at line 398 of file translation.c.

References callbacks_shield_set(), get_wg(), i, lang, lang_num, main_preferences_get_string(), main_preferences_set_string(), and name.

Referenced by main_window_init().