translate directions

Hi,

I translate an IF game, and I want to translate the directions in that. I did the following:

Understand "é/észak" as north. Understand "d/dél" as south. Understand "k/kelet" as east. Understand "ny/nyugat" as west. Understand "fel" as up. Understand "le" as down. Understand "be" as inside. Understand "ki" as outside. The printed name of north is "észak" . The printed name of south is "dél" . The printed name of east is "kelet" . The printed name of west is "nyugat" . The printed name of up is "fel" . The printed name of down is "le" . The printed name of inside is "be" . The printed name of outside is "ki" .
The problem is that the game uses the old abbreviations too. For example, when I write d, I mean dél/south, but I get the answer:

How can I remove the original abbreviations?

The easiest way is to replace that section of the Standard Rules. (It’s Section SR1/4 - Directions.)

Specifically, use something like this:

Section - New Directions (in place of Section SR1/4 - Directions in Standard Rules by Graham Nelson)

Then within that section, define your directions in place of the standard ones.

Thanks. I did the following:

Section - New Directions (in place of Section SR1/4 - Directions in Standard Rules by Graham Nelson)

The specification of direction is "Represents a direction of movement, such
as northeast or down. They always occur in opposite, matched pairs: northeast
and southwest, for instance; down and up."

A direction can be privately-named or publicly-named. A direction is usually
publicly-named.
A direction can be marked for listing or unmarked for listing. A direction is
usually unmarked for listing.

A direction has a direction called an opposite.

Include (-
	has scenery, ! class CompassDirection,
-) when defining a direction.

The észak is a direction.
The északkelet is a direction.
The északnyugat is a direction.
The dél is a direction.
The délkelet is a direction.
The délnyugat is a direction.
The kelet is a direction.
The nyugat is a direction.
The fel is a direction.
The le is a direction.
The belül is a direction.
The kívül is a direction.

The észak has opposite dél. Understand "é" or "north" as észak.
The északkelet has opposite délnyugat. Understand "ék" as északkelet.
The északnyugat has opposite délkelet. Understand "ény" as északnyugat.
The dél has opposite észak. Understand "d" or "south" as dél.
The délkelet has opposite északnyugat. Understand "dk" as délkelet.
The délnyugat has opposite északkelet. Understand "dny" as délnyugat.
The kelet has opposite nyugat. Understand "k" or "east" as kelet.
The nyugat has opposite kelet. Understand "ny" or "west" as nyugat.
Fel has opposite le. Understand "up" as fel.
Le has opposite Fel. Understand "down" as le.
Belül has opposite kívül. Understand "be" as belül.
Kívül has opposite belül. Understand "ki" as kívül.

The verb to be fölötte means the reversed mapping fel relation.
The verb to be mapped fölötte means the reversed mapping fel relation.
The verb to be alatta means the reversed mapping le relation.
The verb to be mapped alatta means the reversed mapping le relation.

It has the following problem: the compiler complains about several rules in other sections in the Standard rules, for example:

So, I have to correct these rules too, or I have to leave the original English directions in my version, and replace the abbreviations only, with my directions, abbreviations.
The first version is not perfect, because players can use the original direction names. The second maybe means to include and rewrite the whole Standard rules…

You might be able to solve this by making the English directions privately-named. When something is privately-named the player can’t use its source code name to refer to it–they can only use the Understand statements you have explicitly given.

This would still mean that you have to use the English names in your source codes instead of the Hungarian ones, though, but that might still be easier than rewriting lots more of the Standard Rules.

Thanks, I will use that.

No problem.
But I still have error messages after this:

The north is a privately-named direction.
The northeast is a privately-named direction.
The northwest is a privately-named direction.
The south is a privately-named direction.
The southeast is a privately-named direction.
The southwest is a privately-named direction.
The east is a privately-named direction.
The west is a privately-named direction.
The up is a privately-named direction.
The down is a privately-named direction.
The inside is a privately-named direction.
The outside is a privately-named direction.

The north has opposite south. Understand "é" or "észak" as north.
The northeast has opposite southwest. Understand "ék" or "északkelet" as northeast.
The northwest has opposite southeast. Understand "ény" or "északnyugat" as northwest.
The south has opposite north. Understand "d" or "dél" as south.
The southeast has opposite northwest. Understand "dk" or "délkelet" as southeast.
The southwest has opposite northeast. Understand "dny" or "délnyugat" as southwest.
The east has opposite west. Understand "k" or "kelet" as east.
The west has opposite east. Understand "ny" or "nyugat" as west.
Up has opposite down. Understand "fel" as up.
Down has opposite up. Understand "le" as down.
Inside has opposite outside. Understand "be" as inside.
Outside has opposite inside. Understand "ki" as outside.

The inside object translates into I6 as "in_obj".
The outside object translates into I6 as "out_obj".

The verb to be above means the reversed mapping up relation.
The verb to be mapped above means the reversed mapping up relation.
The verb to be below means the reversed mapping down relation.
The verb to be mapped below means the reversed mapping down relation.

I didn’t find more about ‘above’ and ‘below’ in the Standard Rules extension.

In fact, it is possible to use the translated name even in your source if you write:

North translates into Hungarian as észak.

(And I think you wouldn’t need the understand lines then.)

However, the line above won’t work by default. You would first have to create a new file at a specific place in your Inform installation to define the Hungarian language (I can explain later if you really want).

A full-featured language extension is quite difficult to write and there as there are a lot of undocumented features that you can use.

You can see the French extension (French Language.i7x) to have an idea of how a language extension looks like. It may seem really complicated, but you don’t need all that is there to have a working extension. And obviously, it’s easier to understand if you know French, but it may still help you if you don’t.

I’m the maintainer of the French extension, so feel free to ask me anything. Seeing a new translation always makes me happy! :smiley:

There is also Spanish and Italian extensions, but I couldn’t find the links at the moment.

If you only want to translate a game, having a full language extension may be overkill, though.

Maybe just for short versions?

Yes, please help me to write a very basic version. Maybe I extend it later, but I think it is a very big task, and I won’t have time creating a pro version. Hungarian language is very complicated :slight_smile: