https://gramps-project.org/wiki/api.php?action=feedcontributions&user=Colinwoods&feedformat=atomGramps - User contributions [en]2024-03-28T19:15:00ZUser contributionsMediaWiki 1.31.3https://gramps-project.org/wiki/index.php?title=Howto:Change_the_language_of_reports&diff=13606Howto:Change the language of reports2009-02-19T13:48:57Z<p>Colinwoods: </p>
<hr />
<div>This howto explains how you can produce reports in a different language than the language you installed linux in.<br />
[[Category:Tutorials|Change the language of reports]]<br />
<br />
{{languages|Howto:_Change_the_language_of_reports}}<br />
<br />
<br />
==Introduction==<br />
If you have an international family, chances are you want to produce reports in the language used by your distant family members. <br />
<br />
Right now GRAMPS is supported in 23 languages ([[GRAMPS_translations|all language files]]). You can produce reports in all these languages, by running GRAMPS in this language and making the report.<br />
<br />
== Run GRAMPS in a different language==<br />
First, lets learn how to run gramps from a terminal or console (the so called CLI-Command Line Interface, which you find typically in the System Menu of your task bar). <br />
This can be done by typing <code>gramps</code>, as GRAMPS typically is installed in the directory <code>/usr/bin</code>. You can also start GRAMPS with <code>/usr/bin/gramps</code>, although this might be different on other distributions.<br />
<br />
This command calls up GRAMPS with the default locale setting of your PC, that is, the language in which you installed your linux OS. If other locales are installed on your system, calling up GRAMPS in this language can be done. Eg, if the locale ''nl'', ''nl_BE'' is installed with encoding ''nl_BE.UTF-8'', you can start it with:<br />
LANGUAGE=nl_BE:nl <br />
LANG=nl_BE.UTF-8 <br />
/usr/bin/gramps<br />
<br />
Once you get the locale working and to make things handy going forward, you can create an alias. Open the file <code>.bashrc</code> (this file is located in your home directory) in a text editor. At the bottom of the file add the following:<br />
<br />
alias gramps_nl=' LANGUAGE=nl_BE:nl; LANG=nl_BE.UTF-8; /usr/bin/gramps'<br />
<br />
You will need to make the alias command unique, so in this instance I have used <code>gramps_nl</code>. Now save the file. The UNIX terminal will need restarted for the new setting to take effect. Enter the alias command <code>gramps_nl</code> to run gramps in another locale. Multiple alias commands can be setup for multiple locales.<br />
<br />
Alternatively you can add a new item to the menu of GNOME or KDE, so this command needs not to be entered in a terminal, but can be called from the menu.<br />
<br />
===Add KDE Menu Item===<br />
----<br />
<br />
[[Image:gramps_locale_add_kde_menu_item.png|frame|Add locale GRAMPS KDE menu item]]<br />
<br />
*Right Click on <code>'K'</code> -> select <code>'Menu Editor'</code><br />
*Click on <code>'Office'</code><br />
*Click on <code>'New Item', Enter <code>'GRAMPS Genealogy System (nl)'</code><br />
<br />
In each of the fields enter:<br />
<br />
*Description: <code>GRAMPS NL Locale</code><br />
*Comment: <code>Manage genealogical information, perform genealogical research and analysis</code><br />
*Command: <code>LANGUAGE=nl_BE:nl; LANG=nl_BE.UTF-8; /usr/bin/gramps</code><br />
<br />
Leave all other options as default. To add the GRAMPS icon, click on the icon beside Name and Description fields<br />
<br />
*Select <code>'Other icons'</code> -> Click on <code>'Browse'</code><br />
*Navigate to directory <code>/usr/share/gramps/images</code><br />
*Select image <code>gramps.png</code><br />
<br />
In the KDE Menu Editor select <code>'Save'</code> and close the window.<br />
<br />
To Launch the locale version of GRAMPS click on K->APPLCATIONS -> OFFICE -> GRAMPS NL Locale<br />
----<br />
<br />
On Windows you need to run the command line (cmd.exe) and type two lines similar to this:<br />
SET LANG=nl_BE.UTF-8<br />
"C:\Python25\pythonw.exe" "C:\Program Files\gramps\gramps.py"<br />
This can be saved to a .bat file for easy execution.<br />
<br />
==What about dates and calendars==<br />
Dates and calendars depend on your locale, not your language setting. So here the variable of importance is locale.CODESET, so the locale must be installed and be the default.<br />
<br />
==How to install a locale==<br />
For the above to work, you must have the needed locales installed. This will be distribution specific. Add to this wiki if you know how to do this in a distributions not listed.<br />
<br />
Before the overview, it is advised to also install the gnome language package for the locale you want, eg for locale ''nl'' you need to install the package <code>language-pack-gnome-nl</code>. The KDE package (kde-i18n-nl) is not needed as GRAMPS uses gnome, even when run in KDE.<br />
<br />
=== Ubuntu and variants===<br />
'''6.06 and later'''<br />
The file <code>/usr/share/i18n/SUPPORTED</code> lists all possible locales. Eg, for ''nl_BE'' we can choose from ''nl_BE.UTF-8 UTF-8, nl_BE ISO-8859-1, nl_BE@euro ISO-8859-15, nl_NL.UTF-8 UTF-8, nl_NL ISO-8859-1'' and ''nl_NL@euro ISO-8859-15''. We advice to use UTF-8 encoding, so here, ''nl_BE.UTF-8 UTF-8'' is the one we need to install.<br />
<br />
Now, we backup the old locale file, and add the required locale. In a terminal you can backup with the commands:<br />
mkdir ~/backup/locales<br />
sudo cp /var/lib/locales/supported.d/local ~/backup/locales/local.old<br />
With your favorite editor, you now need to change the <code>local</code> file as root, by adding the locale you want. So for nl_BE this would be adding the line ''nl_BE.UTF-8 UTF-8'' at the bottom. Watch out: end with a newline, so put an ENTER after this line. Next we need to regenerate the locales:<br />
sudo dpkg-reconfigure locales <br />
This command may not generate errors, if it did, you did something wrong. <br />
<br />
<br />
'''5.10 and before'''<br />
Execute <br />
sudo dpkg-reconfigure locales <br />
and select from the choises given the locales you need. Using UTF8 is advised, eg for ''nl_BE'': choose ''nl_BE.UTF-8'' <br />
<br />
== Run the report==<br />
Having started GRAMPS in another language, all reports you make will also be in this language. Off course, things you typed in yourself are not translated.<br />
<br />
===Tips for international use===<br />
As what you type is not translated, some tips:<br />
* for places: use the actual placename, and not the translated placename. You could add an alternate location to the place with the translated name<br />
* for notes: use the languages the people who are most interested in this section will want it in. This version enables multiple notes, so you are able to make different notes, one per language, with the possibility to use filters to determine what appears<br />
* for descriptions: Try to use builtin description names as much as possible, as those are translated. Eg, try to avoid custom events, and use the builtin events of GRAMPS as much as possible.</div>Colinwoodshttps://gramps-project.org/wiki/index.php?title=File:Gramps_locale_add_kde_menu_item.png&diff=13605File:Gramps locale add kde menu item.png2009-02-19T13:47:47Z<p>Colinwoods: Gramps locale add kde menu item</p>
<hr />
<div>Gramps locale add kde menu item</div>Colinwoodshttps://gramps-project.org/wiki/index.php?title=Howto:Change_the_language_of_reports&diff=13604Howto:Change the language of reports2009-02-19T12:41:35Z<p>Colinwoods: /* Run GRAMPS in a different language */</p>
<hr />
<div>This howto explains how you can produce reports in a different language than the language you installed linux in.<br />
[[Category:Tutorials|Change the language of reports]]<br />
<br />
{{languages|Howto:_Change_the_language_of_reports}}<br />
<br />
<br />
==Introduction==<br />
If you have an international family, chances are you want to produce reports in the language used by your distant family members. <br />
<br />
Right now GRAMPS is supported in 23 languages ([[GRAMPS_translations|all language files]]). You can produce reports in all these languages, by running GRAMPS in this language and making the report.<br />
<br />
== Run GRAMPS in a different language==<br />
First, lets learn how to run gramps from a terminal or console (the so called CLI-Command Line Interface, which you find typically in the System Menu of your task bar). <br />
This can be done by typing <code>gramps</code>, as GRAMPS typically is installed in the directory <code>/usr/bin</code>. You can also start GRAMPS with <code>/usr/bin/gramps</code>, although this might be different on other distributions.<br />
<br />
This command calls up GRAMPS with the default locale setting of your PC, that is, the language in which you installed your linux OS. If other locales are installed on your system, calling up GRAMPS in this language can be done. Eg, if the locale ''nl'', ''nl_BE'' is installed with encoding ''nl_BE.UTF-8'', you can start it with:<br />
LANGUAGE=nl_BE:nl <br />
LANG=nl_BE.UTF-8 <br />
/usr/bin/gramps<br />
<br />
Once you get the locale working and to make things handy going forward, you can create an alias. Open the file <code>.bashrc</code> (this file is located in your home directory) in a text editor. At the bottom of the file add the following:<br />
<br />
alias gramps_nl=' LANGUAGE=nl_BE:nl; LANG=nl_BE.UTF-8; /usr/bin/gramps'<br />
<br />
You will need to make the alias command unique, so in this instance I have used <code>gramps_nl</code>. Now save the file. The UNIX terminal will need restarted for the new setting to take effect. Enter the alias command <code>gramps_nl</code> to run gramps in another locale. Multiple alias commands can be setup for multiple locales.<br />
<br />
Alternatively you can add a new item to the menu of GNOME or KDE, so this command needs not to be entered in a terminal, but can be called from the menu.<br />
<br />
On Windows you need to run the command line (cmd.exe) and type two lines similar to this:<br />
SET LANG=nl_BE.UTF-8<br />
"C:\Python25\pythonw.exe" "C:\Program Files\gramps\gramps.py"<br />
This can be saved to a .bat file for easy execution.<br />
<br />
==What about dates and calendars==<br />
Dates and calendars depend on your locale, not your language setting. So here the variable of importance is locale.CODESET, so the locale must be installed and be the default.<br />
<br />
==How to install a locale==<br />
For the above to work, you must have the needed locales installed. This will be distribution specific. Add to this wiki if you know how to do this in a distributions not listed.<br />
<br />
Before the overview, it is advised to also install the gnome language package for the locale you want, eg for locale ''nl'' you need to install the package <code>language-pack-gnome-nl</code>. The KDE package (kde-i18n-nl) is not needed as GRAMPS uses gnome, even when run in KDE.<br />
<br />
=== Ubuntu and variants===<br />
'''6.06 and later'''<br />
The file <code>/usr/share/i18n/SUPPORTED</code> lists all possible locales. Eg, for ''nl_BE'' we can choose from ''nl_BE.UTF-8 UTF-8, nl_BE ISO-8859-1, nl_BE@euro ISO-8859-15, nl_NL.UTF-8 UTF-8, nl_NL ISO-8859-1'' and ''nl_NL@euro ISO-8859-15''. We advice to use UTF-8 encoding, so here, ''nl_BE.UTF-8 UTF-8'' is the one we need to install.<br />
<br />
Now, we backup the old locale file, and add the required locale. In a terminal you can backup with the commands:<br />
mkdir ~/backup/locales<br />
sudo cp /var/lib/locales/supported.d/local ~/backup/locales/local.old<br />
With your favorite editor, you now need to change the <code>local</code> file as root, by adding the locale you want. So for nl_BE this would be adding the line ''nl_BE.UTF-8 UTF-8'' at the bottom. Watch out: end with a newline, so put an ENTER after this line. Next we need to regenerate the locales:<br />
sudo dpkg-reconfigure locales <br />
This command may not generate errors, if it did, you did something wrong. <br />
<br />
<br />
'''5.10 and before'''<br />
Execute <br />
sudo dpkg-reconfigure locales <br />
and select from the choises given the locales you need. Using UTF8 is advised, eg for ''nl_BE'': choose ''nl_BE.UTF-8'' <br />
<br />
== Run the report==<br />
Having started GRAMPS in another language, all reports you make will also be in this language. Off course, things you typed in yourself are not translated.<br />
<br />
===Tips for international use===<br />
As what you type is not translated, some tips:<br />
* for places: use the actual placename, and not the translated placename. You could add an alternate location to the place with the translated name<br />
* for notes: use the languages the people who are most interested in this section will want it in. This version enables multiple notes, so you are able to make different notes, one per language, with the possibility to use filters to determine what appears<br />
* for descriptions: Try to use builtin description names as much as possible, as those are translated. Eg, try to avoid custom events, and use the builtin events of GRAMPS as much as possible.</div>Colinwoodshttps://gramps-project.org/wiki/index.php?title=Howto:Change_the_language_of_reports&diff=13603Howto:Change the language of reports2009-02-19T12:39:45Z<p>Colinwoods: /* Run GRAMPS in a different language */</p>
<hr />
<div>This howto explains how you can produce reports in a different language than the language you installed linux in.<br />
[[Category:Tutorials|Change the language of reports]]<br />
<br />
{{languages|Howto:_Change_the_language_of_reports}}<br />
<br />
<br />
==Introduction==<br />
If you have an international family, chances are you want to produce reports in the language used by your distant family members. <br />
<br />
Right now GRAMPS is supported in 23 languages ([[GRAMPS_translations|all language files]]). You can produce reports in all these languages, by running GRAMPS in this language and making the report.<br />
<br />
== Run GRAMPS in a different language==<br />
First, lets learn how to run gramps from a terminal or console (the so called CLI-Command Line Interface, which you find typically in the System Menu of your task bar). <br />
This can be done by typing <code>gramps</code>, as GRAMPS typically is installed in the directory <code>/usr/bin</code>. You can also start GRAMPS with <code>/usr/bin/gramps</code>, although this might be different on other distributions.<br />
<br />
This command calls up GRAMPS with the default locale setting of your PC, that is, the language in which you installed your linux OS. If other locales are installed on your system, calling up GRAMPS in this language can be done. Eg, if the locale ''nl'', ''nl_BE'' is installed with encoding ''nl_BE.UTF-8'', you can start it with:<br />
LANGUAGE=nl_BE:nl <br />
LANG=nl_BE.UTF-8 <br />
/usr/bin/gramps<br />
<br />
Once you get the locale working and to make things handy going forward, you can create an alias. Open the file <code>.bashrc</code> (this file is located in your home directory) in a text editor. At the bottom of the file add the following:<br />
<br />
alias gramps_nl=' LANGUAGE=nl_BE:nl; LANG=nl_BE.UTF-8; /usr/bin/gramps'<br />
<br />
You will need to make the alias command unique, so in this instance I have used <code>gramps_nl</code>. Now save the file. The UNIX terminal will need restarted for the new setting to take effect. Enter the alias command <code>gramps_nl</code> to run gramps in another locale. Multiple alias commands can be setip for multiple locales.<br />
<br />
Alternatively you can add a new item to the menu of GNOME or KDE, so this command needs not to be entered in a terminal, but can be called from the menu.<br />
<br />
On Windows you need to run the command line (cmd.exe) and type two lines similar to this:<br />
SET LANG=nl_BE.UTF-8<br />
"C:\Python25\pythonw.exe" "C:\Program Files\gramps\gramps.py"<br />
This can be saved to a .bat file for easy execution.<br />
<br />
==What about dates and calendars==<br />
Dates and calendars depend on your locale, not your language setting. So here the variable of importance is locale.CODESET, so the locale must be installed and be the default.<br />
<br />
==How to install a locale==<br />
For the above to work, you must have the needed locales installed. This will be distribution specific. Add to this wiki if you know how to do this in a distributions not listed.<br />
<br />
Before the overview, it is advised to also install the gnome language package for the locale you want, eg for locale ''nl'' you need to install the package <code>language-pack-gnome-nl</code>. The KDE package (kde-i18n-nl) is not needed as GRAMPS uses gnome, even when run in KDE.<br />
<br />
=== Ubuntu and variants===<br />
'''6.06 and later'''<br />
The file <code>/usr/share/i18n/SUPPORTED</code> lists all possible locales. Eg, for ''nl_BE'' we can choose from ''nl_BE.UTF-8 UTF-8, nl_BE ISO-8859-1, nl_BE@euro ISO-8859-15, nl_NL.UTF-8 UTF-8, nl_NL ISO-8859-1'' and ''nl_NL@euro ISO-8859-15''. We advice to use UTF-8 encoding, so here, ''nl_BE.UTF-8 UTF-8'' is the one we need to install.<br />
<br />
Now, we backup the old locale file, and add the required locale. In a terminal you can backup with the commands:<br />
mkdir ~/backup/locales<br />
sudo cp /var/lib/locales/supported.d/local ~/backup/locales/local.old<br />
With your favorite editor, you now need to change the <code>local</code> file as root, by adding the locale you want. So for nl_BE this would be adding the line ''nl_BE.UTF-8 UTF-8'' at the bottom. Watch out: end with a newline, so put an ENTER after this line. Next we need to regenerate the locales:<br />
sudo dpkg-reconfigure locales <br />
This command may not generate errors, if it did, you did something wrong. <br />
<br />
<br />
'''5.10 and before'''<br />
Execute <br />
sudo dpkg-reconfigure locales <br />
and select from the choises given the locales you need. Using UTF8 is advised, eg for ''nl_BE'': choose ''nl_BE.UTF-8'' <br />
<br />
== Run the report==<br />
Having started GRAMPS in another language, all reports you make will also be in this language. Off course, things you typed in yourself are not translated.<br />
<br />
===Tips for international use===<br />
As what you type is not translated, some tips:<br />
* for places: use the actual placename, and not the translated placename. You could add an alternate location to the place with the translated name<br />
* for notes: use the languages the people who are most interested in this section will want it in. This version enables multiple notes, so you are able to make different notes, one per language, with the possibility to use filters to determine what appears<br />
* for descriptions: Try to use builtin description names as much as possible, as those are translated. Eg, try to avoid custom events, and use the builtin events of GRAMPS as much as possible.</div>Colinwoods