Skocz do zawartości

Nowy szablon forum

mygo.pl

Stworzyliśmy dla Was nowy wygląd forum. Z pewnością znajdziesz rzeczy, które wg Ciebie mogą zostać zmienione - wspomnij o tym w specjalnym wątku.

Czytaj więcej

Jak założyć własną sieć

serwerów CS

Zastanawiasz się nad prowadzeniem własnej sieci serwerów? Przeczytaj podstawowe informacje, na które należy zwrócić uwagę, przy takim projekcie.

Czytaj więcej

Tworzymy spis sieci

dodaj swoją

Dodaj sieć do której należysz, pozwoli to na promocję i budowę ogólnopolskiej bazy sieci CS.

Czytaj więcej

[NMRiH] Multilingual Objectives (v1.0, 2020-01-01)


MYGO.pl
 Udostępnij

Rekomendowane odpowiedzi

  • RSSy
This plugin adds localization support to native objective messages.
It differs from existing solutions in that it overrides the native objective dialog, rather than displaying additional screen messages.

Each objective has a unique identifier with the format "<map name> <objective name>".
To translate an objective message into different languages, simply add its identifier to the translation file, like so:

PHP Code:

"Phrases"
{
    
"nmo_cabin objStart"
    
{
        
"fr"    "Sors du grenier"
        "de"    "Finde einen Weg, um aus dem Dachboden auszubrechen!"
        "nl"    "Ontsnap van de zolder"

        
// You can also override the default English message
        
"en" "Hello world"
    
}


You can get a list of all objective names for a map using the `dump_objectives` console command and looking at the second argument:

Code:

] sv_cheats 1; dump_objectives
24: objStart - Break out of the attic.
21: ObjA - Find keys to unlock door.
25: ObjC - Family is the answer, find the secret book.
23: ObjB - Break planks to proceed.
26: ObjD - Release stair gate.
33: ObjI - Find the car battery, power up the generator and call for help!
30: ObjE - Blast through cabin wall.


Admins can also use the helper command sm_oid to fetch the translation phrase for the current objective.
Code:

Admin: /oid
The current objective is nmo_cabin objStart in the translation file.

CVars:
  • sm_translate_objectives (1/0) (Default: 1)
    • Toggle the translation of objective messages.

GitHub repo: https://github.com/dysphie/nmrih-mul...ual-objectives

Attached Files
File Type: zip multilingual-objectives.zip (8.8 KB)

Wyświetl pełny artykuł

Odnośnik do komentarza
Udostępnij na innych stronach

Jeśli chcesz dodać odpowiedź, zaloguj się lub zarejestruj nowe konto

Jedynie zarejestrowani użytkownicy mogą komentować zawartość tej strony.

Zarejestruj nowe konto

Załóż nowe konto. To bardzo proste!

Zarejestruj się

Zaloguj się

Posiadasz już konto? Zaloguj się poniżej.

Zaloguj się
 Udostępnij

×
×
  • Dodaj nową pozycję...