Skocz do zawartości
Hosting webh.pl - 20%

[resources.invisionpower.com - pliki] Tips and Tricks > Ordering language bits

Rekomendowane odpowiedzi

Opublikowano

When translating language bits, it can be difficult to find a specific bit because they are recalled in the order that they are stored in the database.

So, when you go to ACP->Look and Feel->Manage Languages->Translate in ACP and click on a template to edit, such as public_error, the first template bit might be reports_need_tidcid

However, if you've imported a secondary language pack, the first template bit might be forward_only_members or any other template bit.. It just depends on how they were stored in the database.

More importantly, if you're searching for one specific template bit, you'd be searching through each of the 14 pages of template bits in that template for the one template bit you might need, and since there's no order.. It could be on any page.

By adding a simple order statement, you can alphabetize the template bits, and make it much easier to find the template bit you are looking for.

In /admin/applications/core/modules_admin/languages/manage_languages.php find this code..

       //-----------------------------------------
       // Get the words
       //-----------------------------------------

       $this->DB->build( array( 
                               'select' => '*', 
                               'from'   => 'core_sys_lang_words', 
                               'where'  => "lang_id={$id} {$wp_query} {$search} {$filter}",
                               'limit'  => array( $st, $per_page ),
                       )    );

and change it to

       //-----------------------------------------
       // Get the words
       //-----------------------------------------

       $this->DB->build( array( 
                               'select' => '*', 
                               'from'   => 'core_sys_lang_words', 
                               'where'  => "lang_id={$id} {$wp_query} {$search} {$filter}",
                               'limit'  => array( $st, $per_page ),
                               'order'  => 'word_key ASC',
                       )    );

This will make finding the template bit you are looking for much simpler, and make all your language packs consistent when editing them. Wyświetl pełny artykuł

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

Ostatnio przeglądający 0

  • Brak zarejestrowanych użytkowników przeglądających tę stronę.

Konto

Nawigacja

Szukaj

Szukaj

Skonfiguruj powiadomienia push w przeglądarce

Chrome (Android)
  1. Stuknij ikonę kłódki obok paska adresu.
  2. Stuknij Uprawnienia → Powiadomienia.
  3. Dostosuj swoje ustawienie.
Chrome (Komputer)
  1. Kliknij ikonę kłódki na pasku adresu.
  2. Wybierz Ustawienia witryny.
  3. Znajdź Powiadomienia i dostosuj swoje ustawienie.