Difference between revisions of "Howto:Change the language of reports"

From Gramps
Jump to: navigation, search
Line 1: Line 1:
{{languages|Howto:_Change_the_language_of_reports}}
+
There are various [http://www.trustedessays.net/service/.com essay writing service] on the globe but our exposition composing utilities stands elevated around the rest receivable to our generally encountered and decently educated scholars and editors who sees to the interest and requires of our customers.The paper composing aids furnish influence for each one of those who identify themselves in scenarios like:
This howto explains how you can produce reports in a different language than the language you installed linux in.
 
  
==Introduction==
+
Being suppose to compose a paper to an establishment or a school but don't have the capacity and dexterity to keep in touch with it.
If you have an international family, chances are you want to produce reports in the language used by your distant family members.  
 
  
GRAMPS is supported in [[GRAMPS_translations|many languages]]. You can produce reports in all these languages, by running GRAMPS in this language and making the report.
+
Try not to have the time and asset to compose an article
  
== Run GRAMPS in a different language==
+
Neglected the fundamental plan in composing a particularly great exposition.
First, let's 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).
 
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.
 
  
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. To check if there are other installed locales, use:
+
Our article composing aids are not restrained to specific sort of individuals and doesn't matter where you are placed or where you come from.Our aids are open to all and sundry who identify themselves in any of the scenarios specified previously. Learners, specialists and every person is welcome to like our well composed and planned articles at exceptionally great costs.
locale -a
 
 
 
For example, if the locale ''nl_BE'' is installed with encoding ''nl_BE.UTF-8'', you can start it with:
 
LANG=nl_BE.UTF-8
 
/usr/bin/gramps
 
 
 
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:
 
 
 
  alias gramps_nl=' LANG=nl_BE.UTF-8; /usr/bin/gramps'
 
 
 
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.
 
 
 
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.
 
 
 
===Add KDE Menu Item===
 
----
 
 
 
[[Image:gramps_locale_add_kde_menu_item.png|800px|Add locale GRAMPS KDE menu item]]
 
 
 
*Right Click on <code>'K'</code> -> select <code>'Menu Editor'</code>
 
*Click on <code>'Office'</code>
 
*Click on <code>'New Item', Enter <code>'GRAMPS Genealogy System (nl)'</code>
 
 
 
In each of the fields enter:
 
 
 
*Description: <code>GRAMPS NL Locale</code>
 
*Comment: <code>Manage genealogical information, perform genealogical research and analysis</code>
 
*Command: <code>LANG=nl_BE.UTF-8; /usr/bin/gramps</code>
 
 
 
Leave all other options as default.  To add the GRAMPS icon, click on the icon beside Name and Description fields
 
 
 
*Select <code>'Other icons'</code> -> Click on <code>'Browse'</code>
 
*Navigate to directory <code>/usr/share/gramps/images</code>
 
*Select image <code>gramps.png</code>
 
 
 
In the KDE Menu Editor select <code>'Save'</code> and close the window.
 
 
 
To Launch the locale version of GRAMPS click on K->APPLICATIONS -> OFFICE -> GRAMPS NL Locale
 
 
 
----
 
 
 
'''Add Gnome Menu Item'''
 
 
 
To add a Gnome Menu item, you need to have the menu editor installed; if not installed, (in Fedora) type
 
yum install alacarte
 
in a shell and restart.
 
 
 
The process is similar as for KDE above; right-click on the menu and choose "Edit Menus", go to the desired location in the menu tree and add a "New Menu Item". In the launcher properties window enter:
 
 
 
* Type: <code>Application</code>
 
* Name: [Whatever you like; e.g. <code>Gramps - SV</code>]
 
* Command: <code>env LANG=sv_SE.utf8 /usr/local/bin/gramps</code>
 
* Comment: [Whatever you like; e.g. <code>Starts Gramps in Swedish locale</code>]
 
 
 
[[Note:]] Locale parameters are exported using the keyword ''env'', and my installation of Gramps resides in /usr/''local''/bin as opposed to /usr/bin
 
 
 
----
 
 
 
On Windows you need to run the command line (cmd.exe) and type two lines similar to this:
 
SET LANG=nl_BE.UTF-8
 
"C:\Python25\pythonw.exe" "C:\Program Files\gramps\gramps.py"
 
This can be saved to a .bat file for easy execution.
 
 
 
==What about dates and calendars==
 
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. --> so changing the LANG variable will run GRAMPS with the date and calendar appropriate to the locale (if implemented).
 
 
 
==How to install a locale==
 
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 distribution not listed.
 
 
 
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.
 
 
 
=== Ubuntu and variants===
 
'''6.06 and later'''
 
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 advise to use UTF-8 encoding, so here, ''nl_BE.UTF-8 UTF-8'' is the one we need to install.
 
 
 
Now, we backup the old locale file, and add the required locale. In a terminal you can backup with the commands:
 
mkdir ~/backup/locales
 
sudo cp /var/lib/locales/supported.d/local ~/backup/locales/local.old
 
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:
 
sudo dpkg-reconfigure locales
 
This command must not generate errors; if it did, you did something wrong.
 
 
 
 
 
'''5.10 and before'''
 
Execute
 
sudo dpkg-reconfigure locales
 
and select from the choices given the locales you need. Using UTF8 is advised, eg for ''nl_BE'':  choose ''nl_BE.UTF-8''
 
 
 
== Run the report==
 
Having started GRAMPS in another language, all reports you make will also be in this language. Of course, things you typed in yourself are not translated.
 
 
 
===Tips for international use===
 
As what you type is not translated, some tips:
 
* for places: use the actual placename, for example München and not Munich. You could add an alternate location to the place with the translated name. (Or wait until the [[GEPS_006:_Better_Place_handling|better place handling]] feature is fully implemented and available).
 
* 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
 
* for descriptions: Try to use built-in 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.
 
 
 
===Automatically translate names and places===
 
As of the current version (3.2), GRAMPS doesn't support language tagging of alternative names --- whether for a person or a location. That is, you can add multiple alternative names, each in a different language, but still only one of them will be the primary one --- and will be the one picked up for a report. Nevertheless, when exporting to a relative not speaking your language, or when preparing a report for a part of your family having different language preferences than yourself, you need to change the primary language, but only in a temporary manner --- so that you still continue maintaining your own DB in your preferred language.
 
 
 
Luckily, the simplicity of the GRAMPS XML format allows the use of a small XSL stylesheet, fed by a local translation table of the names you want translated, which you can use for this purpose. Here's how you can easily do it on Linux:
 
* Ensure your administrator installs the "xsltproc" package.
 
* Export your GRAMPS DB (without media) in the .gramps format (i.e., GZipped GRAMPS XML). Save it (let's call it Smith.gramps). Ensure you enable the required censorship on the database (such as restrict the data on living people, etc.)
 
* Store the translation XSL ([http://www.tarunz.org/~vassilii/pub/gramps-translate/gramps-translate.xsl gramps-translate-names.xsl]) near the Smith.gramps. Look at the XSL source for advanced parameters allowing you to customize the translation.
 
* Create the translation dictionary ([http://www.tarunz.org/~vassilii/pub/gramps-translate/t.xml t.xml]) near it as well:
 
<?xml version="1.0" encoding="UTF-8"?>
 
<nowiki><dict xmlns="http://tarunz.org/xml/dict/0.1.0/"></nowiki>
 
<w>
 
&lt;s lang="ru">Хана&lt;/s>
 
&lt;s lang="ru">Ханна&lt;/s>
 
&lt;s lang="de">Hane&lt;/s>
 
&lt;s lang="en">Hannah&lt;/s>
 
</w>
 
</dict>
 
: Populate it with the translations for all the stems you want translated. The translation breaks down names into stems using a customizable delimiter set. This allows translation of compound names, like ''Menachem-Mendl'', using the same rules, as given for the simple names comprising the compound, i.e., ''Menachem'' and ''Mendl'' in this case.
 
* Run the translation, using the xsltproc command. To just use the defaults (Russian to English translation), do this:
 
gunzip < Smith.gramps | xsltproc gramps-translate-names.xsl - |gzip > en.Smith.gramps
 
:See the XSL source for more advanced parameters. E.g., if you want to collect the stems missing translation into a file "missing", translate into German, and use "[LIVING]" as the censorship marker, the command line will be something like this:
 
gunzip < Smith.gramps | xsltproc --stringparam living '[LIVING]' --param log-missing 1 --stringparam lang-to de gramps-translate-names.xsl - 2> missing |gzip > de.Smith.gramps
 
 
 
 
 
* Use the "missing" file obtained above to collect stems to add to the translation dictionary.
 
* You can use the following [http://www.tarunz.org/~vassilii/pub/gramps-translate/Makefile Makefile] stanza to facilitate your processing:
 
GZIP=gzip
 
GUNZIP=gunzip
 
XSLT=xsltproc
 
TRANSLATEXSL=gramps-translate.xsl
 
en.%.gramps: %.gramps
 
$(GUNZIP) < $< | $(XSLT) --stringparam living '[LIVING]' $(TRANSLATEXSL) - | $(GZIP) > $@
 
* Create a new database in gramps, and import the resulting en.Smith.gramps into it. Review the database, and now produce, using the language translated into, all the reports, export into GEDCOM, etc.
 
 
 
[[Category:Tutorials|Change the language of reports]]
 
[[Category:Documentation]]
 
[[Category:Translators/Categories]]
 

Revision as of 13:30, 6 September 2011

There are various essay writing service on the globe but our exposition composing utilities stands elevated around the rest receivable to our generally encountered and decently educated scholars and editors who sees to the interest and requires of our customers.The paper composing aids furnish influence for each one of those who identify themselves in scenarios like:

Being suppose to compose a paper to an establishment or a school but don't have the capacity and dexterity to keep in touch with it.

Try not to have the time and asset to compose an article

Neglected the fundamental plan in composing a particularly great exposition.

Our article composing aids are not restrained to specific sort of individuals and doesn't matter where you are placed or where you come from.Our aids are open to all and sundry who identify themselves in any of the scenarios specified previously. Learners, specialists and every person is welcome to like our well composed and planned articles at exceptionally great costs.